Using lincurve to adjust pwm output for spindle
- davidmblackburn
- Offline
- New Member
-
Less
More
- Posts: 1
- Thank you received: 0
12 Jun 2015 19:11 #59743
by davidmblackburn
Using lincurve to adjust pwm output for spindle was created by davidmblackburn
Does anybody know of an example config that uses lincurve to map/adjust pwm output for spindle speed?
I have a simple opto isolated integrator connected to the output of the pwm pin, scale has been set to the max spindle speed and setting different S values does indeed alter the speed of the spindle via the VFD, but the real spindle speed can be quite a way off what the set speed is and I was wondering if could use lincurve to do a mapping between the set speed via the pwm to the VFD.
I have a simple opto isolated integrator connected to the output of the pwm pin, scale has been set to the max spindle speed and setting different S values does indeed alter the speed of the spindle via the VFD, but the real spindle speed can be quite a way off what the set speed is and I was wondering if could use lincurve to do a mapping between the set speed via the pwm to the VFD.
Please Log in or Create an account to join the conversation.
13 Jun 2015 03:48 #59767
by andypugh
That should work, but I don't know of a sample configuration.
If you can create a little list of what output you need for a range of spindle speeds, then you just need to set those up as the XY points on the lincurve.
If for example
S0 = 0rpm
S250 = 200rpm
S500 = 550rpm
S1000 = 1000rpm
If you had 4 points, to keep it short...
In this example I have done it the lazy way, which might seem backwards, letting the system "choose" the X-values The alternative would be to see what S-value you needed to get your choice of RPMs, but that is more effort.
Replied by andypugh on topic Using lincurve to adjust pwm output for spindle
I was wondering if could use lincurve to do a mapping between the set speed via the pwm to the VFD.
That should work, but I don't know of a sample configuration.
If you can create a little list of what output you need for a range of spindle speeds, then you just need to set those up as the XY points on the lincurve.
If for example
S0 = 0rpm
S250 = 200rpm
S500 = 550rpm
S1000 = 1000rpm
If you had 4 points, to keep it short...
loadrt lincurve personality=4
addf lincurve.0 servo-thread
setp lincurve.0.x-val-00 0
setp lincurve.0.y-val-00 0
setp lincurve.0.x-val-01 200
setp lincurve.0.y-val-01 250
setp lincurve.0.x-val-02 550
setp lincurve.0.y-val-02 500
setp lincurve.0.x-val-03 1000
setp lincurve.0.y-val-03 1000
net spindle-raw motion.spindle-out => lincurve.0.in
net spindle-corrected lincurve.0.out => pwmgen.0.in
In this example I have done it the lazy way, which might seem backwards, letting the system "choose" the X-values The alternative would be to see what S-value you needed to get your choice of RPMs, but that is more effort.
The following user(s) said Thank You: davidmblackburn
Please Log in or Create an account to join the conversation.
Time to create page: 0.063 seconds