[Lathe] Fanuc OT to DC_CNC conversion

Great! glad to know this approach can work.

I spent a huge amount of time with this idea back about 2005, no joy. Maybe you're the better programmer, or maybe the cards have improved. I do know it was painful enough to not want to repeat the experience :)

Karl, I don't think I'm a better programmer, but rather I have a better platform and programming tools to work with today than you had available in 2005. In 2005 the card that I'm using today was not available, nor was the firmware. The 18x6/40x0 boards and latest rev firmware are an order of magnitude better than the prior generation. Like I said above, I was prepared for a battle to get it to work based on your and others experience. I was pleasantly surprised when it actually worked with very little fuss.
 
I rewrote the Galil code for rigid tapping using the same basic code as used for the single point threading above. It really made an improvement in the tapping cycle, much smoother and took out all of the delays that were present in the old code.

Variables passed by the CNC program
SPDLSPD;'SPINDLE RPM
RATIO;'TPI CONVERTED TO S Z RATIO
ZD;'THREADING DEPTH
RH;'RETRACT POSITION

#G84;'RIGHT HAND RIGID TAPPING
GAC=B;'ASSIGN SPINDLE AS Z MASTER
GDC=3000;'SET ENGAGEMENT RAMP DISTANCE (about 0.200'' on my machine)
GRC=RATIO;'SET GEAR RATIO AND ENGAGE Z
MRC=ZD;'WAIT FOR Z TO REACH ASSIGNED POSITION
SPDLSPD=-SPDLSPD;'SET REVERSE SPINDLE SPEED
OFB=(RPMPERV*SPDLSPD);'REVERSE SPINDLE (RPMPERV is the spindle RPM per volt of the analog output, this is a constant in the program)
MFC=RH;'WAIT FOR Z TO REACH RETRACT POSITION
GDC=300;'SET DISENGAGE RAMP DISTANCE
GRC=0;'UNCOUPLE AXES
XQ#UI1,7;'NOTIFY CNC PROGRAM THAT OPERATION IS COMPLETE
EN
 
Back
Top