[Lathe] Fanuc OT to DC_CNC conversion

I think this will be the next to last update in this thread, the next challenge is to get the thread milling working for the next part run. Once that's completed, the lathe will be done. I have the software written, but it has not been tested yet. Hopefully it won't cause too many more gray hairs. :) Over all the upgrade has been a success, it is much more user friendly than the original Fanuc system. Just the time savings in tool setting made it worthwhile. All it takes now is a mouse click and the tools are set for any job. No more setting the tools to the job.

I spent the last couple of days fiddling with tooling, trying different inserts, and getting the G code dialed in for this run. The lathe went into full production mode today and cut the first 30 or so gallons of chips ( oh, and quite a few parts :grin: ). It takes a couple parts the get the cutter comp dialed in, but after that the machine makes the same, on size, part every time. I am impressed with the quality of the mechanics of this lathe, rock solid. I guess I would expect that from a Hardinge. Now I get to make about 900 of the cones that I showed above. Those cones were taking about an hour per on the Jet manual lathe, now one pops out every 4 minutes. Pretty good improvement. And I'm expecting some different inserts to try out in the next day or so, if they work out I can cut that time down a bit more.

We also hit a new milestone today, we had 2 mills and a lathe all running production at the same time. :D

It's been a good day :)
 
Jim,

two things
1) congratulations on getting this up and running. your hard work has definitely paid off....and will continue to with the new capabilites in your shop.

2) thanks for bringing us all along for the journey! this is something that I don't have the experience or skills for and could not even dream of tackling. but I enjoyed every update. I am sure it slowed your progress to do the photos, videos and updates, but I am sure glad you shared it.

-brino
 
Best CNC posting series of 2018! For sure. We have been lathe watching so long... every time I read new entries I just want a CNC lathe even more!!!!
On my end, Mitch is out for the summer. College man year 3 in the fall. (pic) Popped right into the shop and some projects. Up for an Intern slot at a very cool place . yeah, seems life is pretty good today for the Dad's, their Boy's, and all the Toys. HAPPY MEMORIAL all.
IMG_0711.jpg
 
I haven't updated in a while. We ran out the cones shown in a post above. We did buy the bar puller shown above, works great. Allows us to run out bar lengths without touching the machine. Until we get the bar support built, we are limited to about 4 foot bars to prevent ''whipping'', after the bar support is built we'll be able to run full 12 foot bars.

So on to the next part; A knob with a 1/2-20 threaded bore. It was a bit of a challenge getting the rigid taping to work correctly, but it works fine now (as of yesterday). This involves electronically gearing the spindle to the Z axis to sync them up. Need to buy some proper tap holders, things were going fine until the grub screws loosened in my homemade tap holder and the tap just fell out. :cautious: Going to get some ordered today.

This part also has two 0.125 holes drilled off of the centerline so had to get the live tooling setup and working. It works as planned.

Need to build some spindle liners for some of the smaller diameter parts, right now we are running 1.5 inch material in a 1.625 ID spindle so no liner is needed, but the next run will be 0.625 material so a spindle liner will be required.

Still can't index the spindle, the VFD just isn't controllable enough to be able to do that. So the next major change will be to add a servo spindle. That's going to be a $5K+ retrofit so we need to make a little money with the machine to justify that.

There are still a few loose ends to tie up, but overall the retrofit has been a success. It has been a fun project and I thank you all for following along and your kind comments :)
 
Last edited:
It was a bit of a challenge getting the rigid taping to work correctly, but it works fine now (as of yesterday). This involves electronically gearing the spindle to the Z axis to sync them up.

I'm thinking of trying to do rigid tapping on the mill. It seems to me the best trade I could make is to upgrade my spindle to something with feedback, which I guess means servo motor.

I'd like to make the spindle controllable from the CNC code anyway, so it sounds like the necessary step anyway.

Does that sound right?
 
Yes, you will need some kind of feedback from your spindle. You could just hang an encoder on the spindle and use that. On the lathe I do not have a servo spindle, only an encoder. The spindle is driven by a VFD.

The spindle must be controllable by the CNC program as far as speed and direction, a servo spindle is not needed, but would be nice. The Z axis is slaved to the spindle encoder so all that's required is that you be able to tell the spindle to run forward and reverse at some speed you set.

The basic sequence of operation is:
  • Move X & Y to the hole location
  • Move Z to the retract height
  • Stop the spindle
  • Electronically couple the spindle and Z axis at the proper gear ratio
  • Start the spindle forward
  • Once the Z reaches the proper depth, reverse the spindle
  • Run until the Z reaches the retract height
  • Stop the spindle
  • Uncouple the Z from the spindle.
In watching the Haas rigid tap, I'm pretty sure it uses something like what I described above. Exactly how all of this works depends on the control that you are using. If the spindle is configured as an axis (C axis?) in your control, then it can be as simple making two G1 moves where the spindle and Z move in a coordinated move, but this would probably require a servo spindle.
 
I wrote my own rigid tap cycle for my Excello knee mill. It has a 2J type head with a VFD. I just installed an encoder on the spindle.

Attached is the Camsoft code, but Galil does the real work here. You should be able to follow the gist of the logic.
 

Attachments

  • G84.txt
    5.2 KB · Views: 4
I wrote my own rigid tap cycle for my Excello knee mill. It has a 2J type head with a VFD. I just installed an encoder on the spindle.

Attached is the Camsoft code, but Galil does the real work here. You should be able to follow the gist of the logic.

Thanks - I've saved that and will look it over. I have heard the word Galil, but that's about all I know of it.
 
Just FYI, I use galil electronic gearing for rigid tapping and gear hobbing on my CNC mill. It has run flawlessly for years. This approach did NOT work on my lathe. The difference is speed. need on a lathe is to thread at 1000 or even higher RPM.

Lathe approach was first a high speed index mark. used a slot sensor to a high speed opto 22 input. Got response in the area of a few 10EE-6 seconds. Several revolutions are first sampled to accurately determine RPM. Then the X axis is fired on the index mark to move at the calculated feed rate. With this approach total control of a G76 thread cycle works wonders. I had over a month's work just making this thread cycle run.

I haven't had a need for single point threading on the lathe yet, but I have had some down time so I decided to tackle that project. Sorry this is so technical but it is aimed primarily for the very few users that are using Galil Motion Control products to run their CNC machines.

I got the single point threading working and tested last evening, total time spent was about 16 hours programming and testing. Works great. I was prepared for a battle with the spindle indexing, but it turned out the spindle encoder index pulse worked just fine up to 2000 RPM (that was the max speed I tested it at) after I learned how to use and read it. I do have some advantage here in that I am using a DMC-1846 card with the latest firmware rev. This is faster and has some commands available that were not available in earlier cards and firmware, like latching on the encoder index.

First I tried to use the AI (after input) command with IN86 (AUX Z +). Galil allows the AUX encoder + inputs to be used as general inputs, and being encoder inputs they are high speed inputs. IN86 is valid to use with the AI command, but for some reason the program ignored the state of the input and blasted right through that line of code without regard to the state of the input, which I could see changing. :mad:

OK, on to plan B, try the input latch (AL) function that can be programed with an ALTn to latch on the axis encoder pulse, in this case Galil B axis is my spindle encoder, so ALTB sets the arm latch function to the B encoder index pulse. The minimum required on time for the pulse is 40 nSec, I haven't checked the on time with a scope, but I'm guessing it is in the 2 mSec range at 1000 RPM so a lot of margin there.

I'm gearing the axes together on-the-fly, using the GD (gear distance) command to ramp into the gear so there is a smooth transition to get the Z axis up to speed, about 0.200 of travel. For testing, the Z start position is set about 3/4 inch off of the part, so the Z is up to speed long before the tool reaches part 0. In normal operation I would set the Z start position at about 0.250.

G code was generated in Fusion 360 using an unmodified Haas post processor. This code will work for internal threads also, as well as pipe threads. If no fadeout is needed, then XZRATIO=0 and ZPOS2 = ZPOS1 and the second line of G code (N24 in this case) is not generated for the threading cycle in the post.

Here is a snippet of a G32 thread cycle G code
N21 G0 Z0.7776 (rapid Z to the start position)
N22 G0 X1.496 (rapid X to the start position)
N23 G32 Z-3.0004 F0.166 (start the operation and move Z to the end of the thread at a feed speed of 0.166''/spindle rev [6 TPI])
N24 X1.5 Z-3.0024 F0.166 (fadeout)
N25 G0 X2.3 (rapid X to clearance)
N26 Z0.7776 (rapid Z back to the start position)

G84 is normally used for rigid tapping and has a couple more parameters that are not needed for single point threading.

Here is the Galil code, assumes that the spindle is running.
#G32;'SINGLE POINT THREADING CYCLE LATHE
'VARIABLES PASSED BY CNC PROGRAM
'RATIO;'SPINDLE / Z RATIO TO GENERATE PITCH
'XZRATIO;'X / Z RATIO FOR FADEOUT AT END
'ZPOS1;'END OF FULL DEPTH THREAD, START FADEOUT
'ZPOS2;'END OF THREAD

'THE ACTUAL THREADING CYCLE CODE
GAC=B;'ASSIGN SPINDLE AS Z MASTER
GAA=C;'ASSIGN Z AS X MASTER
GDC=5000;'SET Z ENGAGEMENT RAMP DISTANCE
GDA=200;'SET X ENGAGEMENT RAMP DISTANCE
ALTB;'ARM SPINDLE ENCODER INDEX LATCH
#R;JP#R,(_ALB=1);'WAIT FOR LATCH TO TRIP
GRC=RATIO;'SET GEAR RATIO AND ENGAGE Z
MRC=ZPOS1;'WAIT FOR Z TO REACH ASSIGNED POSITION
GDC=0;'CANCEL Z RAMP INTO GEARING
GRA=XZRATIO;'SET GEAR XZ RATIO AND ENGAGE X FOR FADEOUT
MRC=ZPOS2;'WAIT FOR Z TO REACH ASSIGNED POSITION
GR0,,0;'RELEASE X AND Z AXIS
XQ#UI1,7;'NOTIFY THE CNC PROGRAM THAT THE OPERATION IS COMPLETE
EN;'END G32

I didn't have a threading tool set up in the lathe, so I did these tests with a 55° diamond shape tool with a 0.008 radius nose to get a more or less pointy end.

I had the lathe set up for running 1.5 inch bar stock so I started at 6 TPI on a chunk of 1.5 inch aluminum bar @ 200 RPM I just did a 0.010 deep scratch cut and ran 6 passes to see if the it would pick up the previous pass again, it worked flawlessly. :) Then I ran the program several times and the only drift I got was from the part moving in the collet slightly when the collet released at the end of the cycle. Then I bumped it up to 400 and then 800 RPM with the same results on the same bar picking up the previously cut thread. Then I did the same test at 24 TPI with the same result. In both cases the thread pitch was perfect as close as I could measure with my thread pitch gauges at 10x magnification. There is no noticeable latency inconsistency in the operation that would have shown up when picking up the thread again.

Then I did a copy & paste to generate a couple hundred cycles of the same cut (6 TPI, 0.010 deep scratch pass) at 400 RPM just to see if the latency was consistent. I'm happy to report that the last pass hit exactly where the first pass cut. :) About 15 minutes of repeating the same cut.

This is after a couple hundred passes.
1544991468869.png

I'm going to say this was a success :encourage:

Next is to get the spindle indexing working so I can use the live tooling to its full potential doing mill/turn operations. :faint:
 
Last edited:
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 :)
 
Back
Top