[4]

[Lathe] Fanuc OT to DC_CNC conversion

[3]
[10] Like what you see?
Click here to donate to this forum and upgrade your account!

Karl_T

H-M Supporter - Sustaining Member
H-M Platinum Supporter ($50)
Joined
Oct 14, 2014
Messages
1,027
Likes
433
#31
Lookin' good Jim.

I plan to get the same servos for a Vectrax mill and run them with galil. At some point, I'd like to know the details about this and what gotchas to watch for.
 

JimDawson

Global Moderator
Staff member
H-M Platinum Supporter ($50)
Joined
Feb 8, 2014
Messages
7,150
Likes
5,396
#32
Thank you Karl.

So far the servos work as expected. Pretty easy to tune. I had a bit of confusion about wiring up the enable circuit, but that was quickly sorted out by an email to DMM tech support. They are very responsive and helpful. I would like more technical detail in their documentation, especially on the analog input functions. They tell you how to set it up, but I would like to understand a bit more of how it works internally and and how some of the setting affect the operation and interact with the external controller.

One odd thing is that the KP and KD had to be set higher on these than any servo I have connected to a Galil. 120 and 240 respectively. No problem, just a bit odd. I'm going to have another look at the DMM setup software, I may not have something set correctly. Both the X and Z are holding +/- 5 encoder pulses (about 5 microns). The 1.8 KW servos have about twice the torque of the original servos, so I expect good accuracy without sacrificing any speed. It's always easier to turn down the torque than it is to squeeze more out of an under powered servo. :)
 

Karl_T

H-M Supporter - Sustaining Member
H-M Platinum Supporter ($50)
Joined
Oct 14, 2014
Messages
1,027
Likes
433
#33
Did you tune with Galil Tools or Galil WSDK? How much KI?

IIRC, issue SH from galil to set enable, MO to turn it off. Don't remember the hard wiring off the top of my head. I do remember all AMC servo drives have an enable signal pin. Remind me more from here.
 

JimDawson

Global Moderator
Staff member
H-M Platinum Supporter ($50)
Joined
Feb 8, 2014
Messages
7,150
Likes
5,396
#34
I tune manually using Galil Tools. Keep bumping up the speed and accel/decel, adjusting the PID manually as I watch the position error. Been doing it that way for years and I'm too old to change my ways now :grin: My KI is set to 0, I have found that setting to >0 many times causes overshoot. I'll be playing around with the tuning a bit more later.

Yes, SH and MO set the Enable output high or low depending on which chip you are using for the output (7407 or 7406). There was no problem with the Galil end, my opto relay was turning on and off just fine, but who would have thought that you would connect the drive onboard +14Vout to +14Vin (pin 17 to pin 4) to use the onboard power supply. :confused 3: That one is not documented (or at least I didn't catch it) but tech support was helpful.
 

Karl_T

H-M Supporter - Sustaining Member
H-M Platinum Supporter ($50)
Joined
Oct 14, 2014
Messages
1,027
Likes
433
#35
If I understand the drive is looking for a switch from its power to its enable signal on pin 4 ??? switch closed equals enable.

Karl
 

mksj

Active User
H-M Supporter - Gold Member ($25)
Joined
Jun 12, 2014
Messages
1,898
Likes
2,316
#36
Jim,
You do impressive work and your wiring is beautiful. Fun watching this come along, takes a lot of guts and know how to tear a CNC machine down to basics and then make it better than the original machine. Thanks for posting.
Mark
 

JimDawson

Global Moderator
Staff member
H-M Platinum Supporter ($50)
Joined
Feb 8, 2014
Messages
7,150
Likes
5,396
#37
If I understand the drive is looking for a switch from its power to its enable signal on pin 4 ??? switch closed equals enable.
Karl
It's not quite that simple. Once you connect pins 4 and 17 together, you can then disconnect pin 15 (Enable) from pin 1 (GND) to enable the drive. o_O Now you can see my confusion. :eek:

Jim,
You do impressive work and your wiring is beautiful. Fun watching this come along, takes a lot of guts and know how to tear a CNC machine down to basics and then make it better than the original machine. Thanks for posting.
Mark
Thank you for the kind words Mark.
 
Last edited:

JimDawson

Global Moderator
Staff member
H-M Platinum Supporter ($50)
Joined
Feb 8, 2014
Messages
7,150
Likes
5,396
#38
Another update:

I have all the axes under control, finally. Calibrated the X & Z axes yesterday, and got the homing routine working correctly. Then I started on the tool turret code, got that finished up this morning. Then later today I managed to get the spindle under full computer control, I don't have the spindle indexing code done yet, but we don't need that or the live tooling immediately. The live tooling drive servo works, but I can't turn it on from the CNC program yet, still need to write that code. Still need to clean up a few loose ends in the code and interface, but the wiring is complete. Taking a break from working on the screen graphics right now. These 16 hour days are wearing me out, getting too old for this stuff. :faint:

I think tomorrow I'll be able to run a few air cuts and make sure everything is going to behave. Then I'll finish putting the rest of the sheet metal on, and clean up the wiring, get it all tied down properly. I hope we'll be making real chips by Monday, need to get some parts out the door. And I still need to get taxes done by 23:59 on Tuesday :grin:

Stay tuned......... Video coming soon :D
 

Boswell

Hobby Machinist since 2010
H-M Platinum Supporter ($50)
Joined
Feb 27, 2014
Messages
651
Likes
298
#39
Thanks for the update Jim. It is fascinating to keep up with your progress. Looking forward to seeing Video.
 

Karl_T

H-M Supporter - Sustaining Member
H-M Platinum Supporter ($50)
Joined
Oct 14, 2014
Messages
1,027
Likes
433
#40
lookin' good. You said you'd be done by Wednesday, remember? :)
 

JimDawson

Global Moderator
Staff member
H-M Platinum Supporter ($50)
Joined
Feb 8, 2014
Messages
7,150
Likes
5,396
#41
Another update:

I did make the first chips a couple of days ago, but it really doesn't count. I just took a light skin cut on a piece of stock using the MPG as part of getting the axis calibration and offsets figured out. Needed to figure where the spindle centerline was relative to the turret face and relative to the X home position and the tool setter. Figuring out exactly where everything is at on a CNC lathe is a lot more complex than a mill, I'm on a bit of a learning curve here.

I have all of the sheet metal back on so was able to test the coolant pumps. They work fine and are under computer control.

The next step is to get all of the offsets figured out in the software so it's operator friendly. When done, I'll be able to index through all of the turret positions and set all of the tool offsets from the tool setter. You can approach the tool setter from either side and is also useful for finding the exact width of a parting or grooving tool as well as locating the exact center of a drill bit.

Tool setter in the stored position
1524276601525.png

Setting the X axis position. According to the manufacturer literature, the tool setter switches are good for +/- 1 micron. Close enough for me. :)
1524276674782.png

And setting the Z axis position
1524276722196.png
 

Karl_T

H-M Supporter - Sustaining Member
H-M Platinum Supporter ($50)
Joined
Oct 14, 2014
Messages
1,027
Likes
433
#42
Lookin' great Jim.

MANY moons ago, I tried a toolsetter, much cheaper version. Did not have good results, or at least the needed accuracy. At the time, I thought the problem was as much my 30 year old lathe as it was the probe. Anyway, I'm back to making test cuts when accurate setting is required. Even after this, there is often a thou or so adjustment on part one. I will watch to see if yours does better.
 

silverforgestudio

H-M Supporter - Sustaining Member
H-M Platinum Supporter ($50)
Joined
Jul 8, 2015
Messages
94
Likes
80
#43
Jim- awesome- now I see what you guys were chatting about in my thread w the Galil and box of Bugatti parts- awesome to see the work! From a rank hand-file and hacksaw level fellow looking at your work- looks awesome and thanks for sharing!
 

Boswell

Hobby Machinist since 2010
H-M Platinum Supporter ($50)
Joined
Feb 27, 2014
Messages
651
Likes
298
#44
This is quite a complex project and your steady progress is inspiring. (still looking for video :) )
 

JimDawson

Global Moderator
Staff member
H-M Platinum Supporter ($50)
Joined
Feb 8, 2014
Messages
7,150
Likes
5,396
#45
Lookin' great Jim.

MANY moons ago, I tried a toolsetter, much cheaper version. Did not have good results, or at least the needed accuracy. At the time, I thought the problem was as much my 30 year old lathe as it was the probe. Anyway, I'm back to making test cuts when accurate setting is required. Even after this, there is often a thou or so adjustment on part one. I will watch to see if yours does better.
Thank you Karl. I expect the tool setter will be useful for rough setting even though it is supposed to be high accuracy. The tool bit will never approach the tool setter the same way it approaches the work, so I assume that some fine tuning will be needed when turning parts.

Jim- awesome- now I see what you guys were chatting about in my thread w the Galil and box of Bugatti parts- awesome to see the work! From a rank hand-file and hacksaw level fellow looking at your work- looks awesome and thanks for sharing!
Thank you for the kind words. The Galil card is a very flexible motion controller and with a little planning can be used to run anything that needs to move accurately. I have been using them in projects for the last 20 years. I have proabaly installed about 70 or 80 of them in various machines all over the world, mostly in machines for the wood products industry.

This is quite a complex project and your steady progress is inspiring. (still looking for video :) )
Thank you. The video is coming soon. I have to pull off of this project for today and get some milled parts out the door. Actually will be a nice break, I've been over taxing my poor old brain trying to figure out all of the logic for the lathe systems. :)
 

JimDawson

Global Moderator
Staff member
H-M Platinum Supporter ($50)
Joined
Feb 8, 2014
Messages
7,150
Likes
5,396
#46
I reached a new milestone today, I cut piles of air chips :grin:.

I finally got the tool offsets correct after realizing I was using the currently loaded tool offsets for all of the tools when I loaded the G-code, rather than applying the correct offsets for the planned tool for the operation. :mad: A little programming error. o_O I thought there was a problem with my math or machine calibration, but it turned out to be a problem with my program logic and order of operation. I was looking for the problem everywhere but where the actual problem was. Took about 30 seconds to fix it once I found it, just a quick change to 2 lines of code.:rolleyes:

Once I had that little problem solved (about a weeks worth of head banging:bang head: ), I was able to get a number of other little operational problems resolved like getting the spindle to run at the right time and turning the coolant off rather than on when it was supposed to be off and a few other minor housekeeping chores. So overall it was a good day.

Hopefully by the weekend I can start converting the 1000 lbs, or so, of aluminum and stainless bar stock that's sitting on the floor into useful parts. So the plan for tomorrow is to do a little fine tuning of the servos and make some real chips :)

Hopefully there will be a video tomorrow. It's been a long arduous journey to get to this point but I can now see the light at the end of the tunnel. :encourage:
 

Jake2465

H-M Supporter - Gold Member
H-M Supporter - Gold Member ($25)
Joined
Dec 27, 2017
Messages
258
Likes
288
#47
Awesome work, Jim! Achievement unlocked :D!
 

brino

Active User
H-M Platinum Supporter ($50)
Joined
Jan 2, 2014
Messages
3,458
Likes
3,484
#48
Great progress Jim.

I reached a new milestone today, I cut piles of air chips :grin:.
At least you were able to avoid that dreaded "air crash".:excitement:
 
Last edited:

Boswell

Hobby Machinist since 2010
H-M Platinum Supporter ($50)
Joined
Feb 27, 2014
Messages
651
Likes
298
#49
Congratulations. Anyone that has done much programing knows exactly what you went through!
 

Charcole

Newbie
Registered
Joined
Jun 5, 2013
Messages
19
Likes
6
#50
wow, I've never seen a pre 95 cnc with a tool eye. Pre 90's CNC's I have ran but I guess employers get cheap. Sounds familiar today even. Looking at that pick with the turning tool reminds me tool room lathe with just tool post. Is it 90 or 60 slant.
 

JimDawson

Global Moderator
Staff member
H-M Platinum Supporter ($50)
Joined
Feb 8, 2014
Messages
7,150
Likes
5,396
#51
wow, I've never seen a pre 95 cnc with a tool eye. Pre 90's CNC's I have ran but I guess employers get cheap. Sounds familiar today even. Looking at that pick with the turning tool reminds me tool room lathe with just tool post. Is it 90 or 60 slant.
I think it's a 60.

I discovered another small problem, the home position was not consistent or rather there were two ''home'' positions. It turned out to be a function of what side of the home switch cam you started on. I fixed that by not using the home switch at all. Now I'm using the travel limit as the home switch so there is only one possible direction to approach the switch. Gently hit the travel limit, back off, rotate the motor in the negative direction to the encoder index pulse. The home position is now consistent to 0.0001''

Still haven't made any real chips, but soon. :)
 

Charcole

Newbie
Registered
Joined
Jun 5, 2013
Messages
19
Likes
6
#52
I think it's a 60.

I discovered another small problem, the home position was not consistent or rather there were two ''home'' positions. It turned out to be a function of what side of the home switch cam you started on. I fixed that by not using the home switch at all. Now I'm using the travel limit as the home switch so there is only one possible direction to approach the switch. Gently hit the travel limit, back off, rotate the motor in the negative direction to the encoder index pulse. The home position is now consistent to 0.0001''

Still haven't made any real chips, but soon. :)
That's always been my understanding that the travel switch was the home switch. But now that you mention that I do recal seeing two rollers on a couple of machines.
 

JimDawson

Global Moderator
Staff member
H-M Platinum Supporter ($50)
Joined
Feb 8, 2014
Messages
7,150
Likes
5,396
#53
In this case, there are 2 switches and 3 cams on each axis. One switch is the travel limit the other is the home switch. The travel limit is operated by a cam at each end of the travel, the home switch has a seperate cam. Some machines have 3 switches according to a schematic that I have.

Now that I am not using the home switch, I'm going to do a little rewiring and use a seperate switch for each end of the travel. This will eliminate the need to perform a limit switch override to move the axis off of the travel limit in case of an overtravel. This will be especially useful when using the MPG
 

Karl_T

H-M Supporter - Sustaining Member
H-M Platinum Supporter ($50)
Joined
Oct 14, 2014
Messages
1,027
Likes
433
#54
You must be a more clever programmer... I had tried to get away without installing a home switch on one axis - knee. Had reliability issues, ended up installing the extra switch. would you care to share the galil code for homing off a limit?

Karl
 

JimDawson

Global Moderator
Staff member
H-M Platinum Supporter ($50)
Joined
Feb 8, 2014
Messages
7,150
Likes
5,396
#55
Happy to share Karl. The key to accuracy is not to use the switch itself for actual positioning, but rather use the encoder index pulse (FI command). But this does only work if the encoder has an index output. It is possible to use only the switch if it is repeatable. You could wire the switch to the index pulse input as well as connecting it to the limit input, in that case you would want to move the LDA=0 after the FI routine and maybe have to move the axis off of the limit before setting LDA=0. The index input is limited to 12V max, but I normally supply the limits with 5V.

#HOMEA
LDA=3;'DISABLE TRAVEL LIMIT
FLA=2000000;'SET FORWARD SOFTWARE LIMIT TO A HIGH VALUE
DCA=1000000;'SET DECEL HIGH SO THE AXIS STOPS ALMOST INSTANTLY
JGA=20000;'SLOW JOG FORWARD, TOWARDS THE LIMIT SW, ABOUT 20MM/SECOND
BGA;'BEGEN MOTION
#G
JP#G,(_LFA=1);'LOOP UNTIL LIMIT IS HIT (_LFA=0)
STA;'STOP AXIS
AMA;'AFTER MOTION COMPLETE
IPA=-10000;'BACK OFF OF LIMIT 10000 COUNTS, ABOUT 10MM
AMA;'AFTER MOTION COMPLETE
LDA=0;'ENABLE TRAVEL LIMIT
HVA=1000;'SET HOMING SPEED TO 1000, DEAD SLOW
FIA;'FIND ENCODER INDEX PULSE
BGA;'BEGEN MOTION
AMA;' AFTER MOTION COMPLETE
WT10;'WAIT 10 MS
FLA=1000;' SET FORWARD SOFTWARE LIMIT TO 1000 PULSES
RLA=-174000;' SET REVERSE SOFTWARE LIMIT TO ABOUT 6MM OFF OF REVERSE TRAVEL LIMIT
EN
 

Karl_T

H-M Supporter - Sustaining Member
H-M Platinum Supporter ($50)
Joined
Oct 14, 2014
Messages
1,027
Likes
433
#56
Thanks, you have a couple program ideas I've not used. I am getting rusty as it has been five years since doing a galil refit. trouble is the machine is so dang reliable, I just don't ever touch it.
 

brino

Active User
H-M Platinum Supporter ($50)
Joined
Jan 2, 2014
Messages
3,458
Likes
3,484
#57
trouble is the machine is so dang reliable, I just don't ever touch it.
I need more of those kind of troubles!
-brino
 

Karl_T

H-M Supporter - Sustaining Member
H-M Platinum Supporter ($50)
Joined
Oct 14, 2014
Messages
1,027
Likes
433
#58
I need more of those kind of troubles!
-brino
I should clarify, its the software that never breaks. Those very few of us that use galil know its world class quality.

Karl
 

Karl_T

H-M Supporter - Sustaining Member
H-M Platinum Supporter ($50)
Joined
Oct 14, 2014
Messages
1,027
Likes
433
#59
Jim, spent some more time with your program...

My Galil Command reference has NOTHING about LD. I assume its stands for LIMIT DISABLE. That's the key I was missing, my program would jump to #limswitch <default limit switch routine> and not always jump back

Does not have HV command either for that matter. I do remember a work around here as my home routine creeps to the index mark.

So I've not been using a full deck. Do I just need to look for a newer command reference? I use all DMC18x0 cards if that matters.
 

Attachments

Jake2465

H-M Supporter - Gold Member
H-M Supporter - Gold Member ($25)
Joined
Dec 27, 2017
Messages
258
Likes
288
#60
I should clarify, its the software that never breaks. Those very few of us that use galil know its world class quality.

Karl
Karl, Jim has helped me a great deal in getting my mill running with Galil. Since it was my first CNC conversion, I probably am sort of oblivious to other manufactures cards and their behaviors. I know there are the run of the mill (pun intended) setups that use Chinese cards and can be had for a fraction of the price. What makes Galil superior to those?
 
[6]
[5] [7]
Top