I'm trying to run a program in our lathe.
The parts is rectangular, and we have a sub spindle cut with the shape of the part.
When we run the individual part program, everything comes out just as we want.
The trouble is when we loop the program, using the original as a sub program.
The first part comes out fine, but on the second part, the sub spindle does not line up correctly and smashes the corners of the part.
We are running this on a Hwacheon Hi-Tech 250 A, Multi-Axis Control TK.
The control is Fanuc 18i – TB.
I'm using the sub spindle as a bar puller and support for the cut-off.
Where the problem only shows up when we are looping, I'm guessing there is something I'm not canceling at the end of the program, but I'm stummped as to what I need to do.
Below is the code from the bar pull to the end of the program.
Can anyone tell me what I need to add (or remove)??
We loop it as a sub program using an M98 command.
Any help would be greatly appreciated.
Thanks,
sul1
( SUB BAR PULL )
G97S2500M04
M120
M169
G0B0.25
M234
G1G98B-0.15F50.0
M235
M168
G4P2000
M69
G1G98B0.235F50.0
M68
G4P2000
M9
G28V0.0
G28U0.0
G28W0.0
M01
N05( MAIN SPINDLE, TURNING )
( CUTOFF CUTOFF1 )
G0G18G40G54G80G99
T0505
G97S2500M4
G0Z-0.01
X0.825Y0.M8
G1X-0.016F0.001
G0X0.825
M9
M105
M121
M205
M5
G28U0
G28W0
G0B10.0
M169
G4P2000
M168
G53G0B0.
M9
M5
G28U0
G28W0
M30
%