This is a brain twister (at least mine):
I was trying to write a macro for machining a parabolic reflector, out of a solid cylindrical workpiece.
The first step was to generate the parabolic profile using mathematical formulae, in a loop. I did it correctly, because when I execute this part of the program, it correctly traces a parabolic profile, exactly the way the points were generated. When I place the WHILE loop (which also has a G01 move to the calculated coordinates, corresponding to each execution of the loop) between block numbers N1 and N2, and command G70 P1 Q2, then also the curve is traced correctly. So far, so good!
Now the problem:
It is necessary to initially use G71 for stock removal. When I insert the same WHILE loop inside G71's P- and Q-blocks, it alarms out with "124 MISSING END STATEMENT" message. In other words, it detects an illegal WHILE loop. If anyone of you has ever used a loop with G71, please let me know the correct way.
A bit of brainstorming:
The G71 profile definition blocks are read and executed from bottom to top. So, do we have to write the WHILE loop in a reverse order?