Bill,
Is this a macro? I have not seen #3=1 #3=#3+1 before?
Rick
Hello Rick,
#3 is a Macro Local Variable (#1 to #33 are Local Variables).
In this example, #3 is simply used as a counter and I used #3 because, if you were to expand on this and write a full Macro program to single point cut the knurl, #3 would be passed as an argument to the Macro by the Address "C". Accordingly, in the Call Block for the Macro, the "C" address would relate to Counter, but any address could be use; it need not be the "C" address.
The example is not a Macro program per se, but just a few Macro statements to create a Loop and therefore, cut down on the amount of program code to write. You could easily expand on this basic concept and allocate a Macro Variable for the number 8 in the following Macro statement:
WHILE [#3 LE 8] DO1
The 8 in the above Macro statement is the number of Thread Starts in the Knurl. Variables could also be used to represent the Feed Rate in the G76 Cycle (the Lead of the Thread) and the Pitch of the Knurl. When designing the Macro, you could then decide which two of the following to specify:
1. The number of Starts
2. The Pitch of the Thread
3. The Lead of the Thread
If 1 and 2, the Macro would calculate the Feed/Rev (Lead of the Thread) to use with the G76 Cycle (The number of Starts x Pitch).
If 2 and 3, the Macro would calculate the Number of Starts, which is used as the Counter in the Macro. (Lead of the Thread / Pitch).
If 1 and 3, the Macro would calculate the Pitch of the Knurl, which is used as the Z Offset for each successive Thread Start to cut (Lead of the Thread / The number of Starts).
I suspect that the Lead and Pitch would be best specified (the most likely known aspects of the knurl)and the Macro would calculate the number of repeats (number of Starts) of the G76 Cycle.
Regards,
Bill