Loops with IF/GOTO
Repeat work with a GOTO loop back to a sequence label instead of copying blocks.
There's no WHILE on the OSP — a loop is a label at the top and an IF[…]GOTO at the bottom that jumps back while there's work left. Keep a counter, step it inside the loop, and test it against the limit. This is the moment a program stops being a list of moves and starts being software.
Your turn
A roughing cycle takes VC1 passes, and pass n removes n millimetres. Loop with IF[…]GOTO back to a sequence label, accumulating the total depth removed in VC2 and leaving the last pass number in VC3. (Four passes remove 1+2+3+4 = 10 mm.)
The machine gives you
VC1 = 4VC1 = 6Your program is run once for each set of conditions. It has to work for all of them.
This is a learning simulation — always prove out a program on the actual control before you cut metal.