I've used a variable as a counter in a number of macros to control the number of times things are done, in what order, etc.. Like in the logic below which does a macro at different places in X, the first at zero, the second at 6.5, third 16., fourth 22.5. (These are vise stops)
N1
G65 P20
#101=[#101+1.] (increment counter)
IF[#101EQ1.]THEN[#102=6.5]
IF[#101EQ2.]THEN[#102=16.]
IF[#101EQ3.]THEN[#102=22.5]
G52 X#102
GOTO1
What I'm wondering is if this is something where the limitations of binary arithmetic will eventually burn me. If I'm doing a bunch of math in a macro it seems to be an issue but just doing a counter seems to work. Am I just lucky? |