Getting spindle speed scaled right
- bottleworks
- Offline
- Senior Member
-
Less
More
- Posts: 73
- Thank you received: 0
23 Mar 2014 14:16 #45132
by bottleworks
Getting spindle speed scaled right was created by bottleworks
I'm working on getting my spindle speed scaled right. Right now, I've got it set for a commanded speed of 1500rpm and it will produce a correct 1500 rpm at the spindle. The issue is at higher speeds it doesn't scale correctly. The hardware for speed control is a MESA 7i76 using the analog output to control spindle speed. My VFD is configured for 1110rpm @ 0V...4500rpm @ 10v. 20hz @ 1110rpm, 80hz @ 4500rpm.
0.0007 Gets 1500rpm to match up, however, the curve doesn't match with the curve of the VFD. The VFD does have some bias settings, however, if it can be done in HAL, I would rather do that.
loadrt scale count=1
addf scale.0 servo-thread
setp scale.0.gain 0.0007
net spindle-speed-scale motion.spindle-speed-out => scale.0.in
net spindle-speed-DAC scale.0.out => hm2_5i25.0.7i76.0.0.spinout
0.0007 Gets 1500rpm to match up, however, the curve doesn't match with the curve of the VFD. The VFD does have some bias settings, however, if it can be done in HAL, I would rather do that.
Please Log in or Create an account to join the conversation.
24 Mar 2014 00:46 #45156
by cmorley
Replied by cmorley on topic Getting spindle speed scaled right
I think lincurve will do what you want, but it's only in master (you could add it to 2.5, if that's what you are using)
Info to use it is pretty sparse (unless you know what a lincurve is):
www.linuxcnc.org/docs/devel/html/man/man9/lincurve.9.html
Here is how Gene used it (plus a ton of other things) with PID in a lathe situation:
geneslinuxbox.net:6309/gene/lathe-stf/my-lathe.hal
Andy, who made the lincurve, might pop in and give more pointed advice.
Chris M
Info to use it is pretty sparse (unless you know what a lincurve is):
www.linuxcnc.org/docs/devel/html/man/man9/lincurve.9.html
Here is how Gene used it (plus a ton of other things) with PID in a lathe situation:
geneslinuxbox.net:6309/gene/lathe-stf/my-lathe.hal
Andy, who made the lincurve, might pop in and give more pointed advice.
Chris M
Please Log in or Create an account to join the conversation.
- bottleworks
- Offline
- Senior Member
-
Less
More
- Posts: 73
- Thank you received: 0
30 Mar 2014 13:52 #45404
by bottleworks
Replied by bottleworks on topic Getting spindle speed scaled right
I guess I'll wait until that's further developed.... Unless there is a LinuxCNC consultant on here which is available for hire?
Please Log in or Create an account to join the conversation.
30 Mar 2014 18:07 #45412
by andypugh
Setting up the spindle for closed-loop operation might be what you want.
It is (almost) as easy as replacing the "scale" with a "pid", setting FF0 to your 0.0007 then tweaking the I and P gains.
Replied by andypugh on topic Getting spindle speed scaled right
I'm working on getting my spindle speed scaled right.
.loadrt scale count=1 addf scale.0 servo-thread setp scale.0.gain 0.0007 net spindle-speed-scale motion.spindle-speed-out => scale.0.in net spindle-speed-DAC scale.0.out => hm2_5i25.0.7i76.0.0.spinout
Setting up the spindle for closed-loop operation might be what you want.
It is (almost) as easy as replacing the "scale" with a "pid", setting FF0 to your 0.0007 then tweaking the I and P gains.
Please Log in or Create an account to join the conversation.
30 Mar 2014 21:04 - 30 Mar 2014 21:10 #45416
by PCW
Replied by PCW on topic Getting spindle speed scaled right
If the VFD has a offset but is otherwise linear you should
be able to fix this with the scale components offset pin.
setp scale.0.gain 0.002941
setp scale.0.offset -3.235
But... you will need to check what this does at 0 RPM setting and you may have to make sure the
VFD enable is off if commanded speed is below 1100 RPM
(on the other hand having the VFD use an arbitrary offset (1100 RPM) seems
wrong anyway and might be better fixed by correcting the VFD setup so 0V = 0 RPM)
be able to fix this with the scale components offset pin.
setp scale.0.gain 0.002941
setp scale.0.offset -3.235
But... you will need to check what this does at 0 RPM setting and you may have to make sure the
VFD enable is off if commanded speed is below 1100 RPM
(on the other hand having the VFD use an arbitrary offset (1100 RPM) seems
wrong anyway and might be better fixed by correcting the VFD setup so 0V = 0 RPM)
Last edit: 30 Mar 2014 21:10 by PCW.
Please Log in or Create an account to join the conversation.
- bottleworks
- Offline
- Senior Member
-
Less
More
- Posts: 73
- Thank you received: 0
08 Apr 2014 13:39 #45681
by bottleworks
So, maybe I'm thinking about in the wrong way. My thought was to utilize the full 0V-10V range over only the usable frequency. I figured this would give a higher resolution within the usable speed range. So, I didn't want to "waste" any of the 0-10V on the frequency range which is too low for use. I'm I trying to fix a problem which doesn't exist? In other words, the 0-10V provides sufficient resolution?
Replied by bottleworks on topic Getting spindle speed scaled right
(on the other hand having the VFD use an arbitrary offset (1100 RPM) seems
wrong anyway and might be better fixed by correcting the VFD setup so 0V = 0 RPM)
So, maybe I'm thinking about in the wrong way. My thought was to utilize the full 0V-10V range over only the usable frequency. I figured this would give a higher resolution within the usable speed range. So, I didn't want to "waste" any of the 0-10V on the frequency range which is too low for use. I'm I trying to fix a problem which doesn't exist? In other words, the 0-10V provides sufficient resolution?
Please Log in or Create an account to join the conversation.
08 Apr 2014 16:32 #45689
by andypugh
Do you really know exactly what spindle speed you need? Even the "book values" are estimates that will need to be tweaked for your machine, material and cutters.
If you have particularly exacting speed control requirements then you can run the spindle closed-loop, and the feedback will compensate for any non-linearity and dither round any lack of precision.
I don't know exactly what the spindle interface ciircuit is (whether a digital pot chip or a pwm to voltage conversion) but I would guess it has at least 128 steps if the former (probably more) and if it is the latter then it is probably 10Mhz PDM into a 5kHz filter, for about 2000 steps.
Bear in mind that a traditional milling machine would have 8 or 12 gears.
Replied by andypugh on topic Getting spindle speed scaled right
In other words, the 0-10V provides sufficient resolution?
Do you really know exactly what spindle speed you need? Even the "book values" are estimates that will need to be tweaked for your machine, material and cutters.
If you have particularly exacting speed control requirements then you can run the spindle closed-loop, and the feedback will compensate for any non-linearity and dither round any lack of precision.
I don't know exactly what the spindle interface ciircuit is (whether a digital pot chip or a pwm to voltage conversion) but I would guess it has at least 128 steps if the former (probably more) and if it is the latter then it is probably 10Mhz PDM into a 5kHz filter, for about 2000 steps.
Bear in mind that a traditional milling machine would have 8 or 12 gears.
Please Log in or Create an account to join the conversation.
- bottleworks
- Offline
- Senior Member
-
Less
More
- Posts: 73
- Thank you received: 0
11 Apr 2014 11:31 #45839
by bottleworks
No. This is a case of me trying to fix something that's not broken. When I get a break, I'll try the suggestions and get it scaled right. Thanks
Replied by bottleworks on topic Getting spindle speed scaled right
Do you really know exactly what spindle speed you need?
No. This is a case of me trying to fix something that's not broken. When I get a break, I'll try the suggestions and get it scaled right. Thanks
Please Log in or Create an account to join the conversation.
Time to create page: 0.126 seconds