I think I have a syntax error trying to loop a program. It is turning and milling on a 5" diameter bar, it doesn't pull the bar so I want to get 3 or 5 parts parted off per program run. Hoping to use G52 to update the work offset by computing the stepover per iteration.
Fanuc 16TB, program goes something like this:
Error message was 004 variable/reference not found or something similar to that.
Fanuc 16TB, program goes something like this:
Code:
:1005 (BACKPLATE TURRET1 PROG)
G0 G20 G40 G80 G96 G99
#1 = 0.0 (loop count)
#2 = 3.0 (Max iterations)
#3 = 0.262 (stepover CONST)
WHILE[#2 GT #1] DO1
#1 = #1 + 1
.
.
.
G52 Z - #3*#1 (Z zero update) <--- likely problem syntax
END1
G52 Z0.0
M5
M9
G0 G28 U0.
G0 G28 W0.
M46 (C AXIS JOINT RELEASE)
G54
M30
Error message was 004 variable/reference not found or something similar to that.