What's new
What's new

Twin Spindle lathe programming questions

K Barnett

Plastic
Joined
Mar 27, 2013
Location
Iowa, USA
Alright, What I am working with in the shop is a Yama Seiki GTH-2600M twin spindle lathe with a Fanuc 0i controller. We are utilizing a gantry to automatically load and switch the parts out of the chucks in the processing. The question presented to me by one of our set up guys was this;"Is there a way to keep the 2nd op program from reading the end of it's program (to keep it from triggering the gantry) before the first op lathe program is finished with it's process?" The reason for this is that the lathe locks the doors to the point that the operator can't get into the first op spindle when a tool life's out to change the insert if the 2nd op program has finished out. The only way to get into the work space if that situation comes up is to "RESET" the lathe programs to be able to unlock the doors.

I was wondering if there was a way to hold the second op program (in a wait mode of sorts) until the M30 code is read in the first op program? Then the 2nd op program could read the M30 in its program and continue as normal. Is there a way to cross communicate between sides in a twin spindle lathe environment? I look forward to see what you have to say on this. Thanks
 
So in my Mits controlled Citizens, you have wait codes, and if one head hits the wait code before the other, it pauses until the other head catches up.

A sample would read:

HEAD 1
G0X0Y0Z0
!2L1 (WAIT FOR HEAD 2 TO REACH L1)
G0X2.5Y2.5Z2.5





HEAD 2
G0X1Y1Z1
G0X2Y2Z2
G0X3Y3Z3
!1L1 (WAIT FOR HEAD 1 TO REACH L1)
G0X4Y4Z4


In this example, Head 1 would go to X0 Y0 Z0 and wait until Head 2 reached X3 Y3 Z3, and then proceed to go to X2.5 Y2.5 Z2.5, while Head 2 simultaneously proceeds to X4 Y4 Z4.

There has to be something similar with your lathe.
 
The Oi control on my Tsugami twin spindle uses M5xx “Wait Codes” that do just what you want. When either program reaches, say, M500 it will wait until the other program reaches the same code (M500 in this case) and then both programs carry on. But being a different machine configuration it may not be available on your setup (it is essentially required for Swiss machining.)

Lacking that I imaging you could program a “WHILE” macro loop whereby the right spindle program waits right before M30 until some macro variable is changed from a “0” to a “1” near the end of the left spindle program.
 
You could always have the programs set a flag in a variable to tell each other when they are done. You might have to set a parameter on the control to let the programs share a set of variables in a twin turret machine. If you do, you'd have to make sure two programs aren't trying to change the same variable, otherwise that would cause problems obviously.

So on turret 1, the beginning of the program would have something like
Code:
#101=#0;

Then when it's done machining, it would have
Code:
#101=1;

Then before your second turret program ends, just set up a loop that checks if the first is done yet

Code:
#28=0
WHILE [#28 NE 1] DO 1
IF [#101 EQ 1] THEN #28=1
G4P5000 
END 1

Or manually make the loop if your control doesn't like doing loops

Code:
N1000
IF [#101 EQ 1] THEN GOTO 1010
G4P5000 
GOTO 1000
N1010

I use a Mitsubishi control so some syntax with the if statement could be slightly different. Change the G4 to something reasonable, that will determine how often it checks if the other program has finished.
 
I'm sure that you have WAIT codes available.


Just put a WAIT code before your M30 on each path.


-------------------

Think Snow Eh!
Ox
 








 
Back
Top