Closed loop spindle speed and orientation
21 Jan 2015 01:30 #55214
by Niko
Replied by Niko on topic Closed loop spindle speed and orientation
So an encoder with 2500 ppr, velocity is 10 times more?
Please Log in or Create an account to join the conversation.
21 Jan 2015 02:11 - 21 Jan 2015 02:13 #55221
by PCW
Replied by PCW on topic Closed loop spindle speed and orientation
For a spindle with a 2500 line encoder (10000 counts per turn with quadrature)
you would set the encoder scale to 10000.
Setting the encoder scale to 10000 will scale the encoder position output
to 1.000 per turn and the encoder velocity output to revolutions per second
(which is what linuxCNC needs)
you would set the encoder scale to 10000.
Setting the encoder scale to 10000 will scale the encoder position output
to 1.000 per turn and the encoder velocity output to revolutions per second
(which is what linuxCNC needs)
Last edit: 21 Jan 2015 02:13 by PCW.
Please Log in or Create an account to join the conversation.
21 Jan 2015 02:23 #55222
by Niko
Replied by Niko on topic Closed loop spindle speed and orientation
Do I have to use the index ?
Please Log in or Create an account to join the conversation.
21 Jan 2015 20:29 #55236
by Niko
Replied by Niko on topic Closed loop spindle speed and orientation
The spindle maintains it's speed well, but in the wrong direction . How can I reverse it ? Also M19 moves the spindle, but stops far from the target . It seems there is no referense point for the spindle motion.spindle-index-enable doesn't seem to enable the index .The Bosch system used to stop on index .
Please Log in or Create an account to join the conversation.
24 Jan 2015 01:19 #55297
by andypugh
It seems likely that the spindle motor "enable" is being set in M3 M4 mode, but not in orient mode. You probably need to trace the signals from motion.spindle.is-on through to an IO pins and check that that works in Orient mode.
Replied by andypugh on topic Closed loop spindle speed and orientation
It has enable and the pwm actually sends an output (a few hundred millivolts) but the spindle does not turn . M3 and M4 work .
It seems likely that the spindle motor "enable" is being set in M3 M4 mode, but not in orient mode. You probably need to trace the signals from motion.spindle.is-on through to an IO pins and check that that works in Orient mode.
Please Log in or Create an account to join the conversation.
24 Jan 2015 14:45 #55306
by Niko
Replied by Niko on topic Closed loop spindle speed and orientation
or2 did the job . What's the correct way to tune the pid for speed ? The position one was fairly easy and it now orients well . I played arround with FF . FF0 sort of works for speed but the change is not linear . The spindle seems to have only a P regulator in it , and I'd like to correct that with the pid .
Please Log in or Create an account to join the conversation.
26 Jan 2015 01:02 #55331
by andypugh
Typically a spindle speed controller will work best with FF0 and I. You might get a faster dynamic response with some P too, but start with FF0 to get the best mid-range speed accuracy, and then use I-gain to make the speed accurate at other speeds.
If all that you want is a linear response then the linearisation curve component (lincurve) might be simpler than using a PID component.
Replied by andypugh on topic Closed loop spindle speed and orientation
or2 did the job . What's the correct way to tune the pid for speed ?
Typically a spindle speed controller will work best with FF0 and I. You might get a faster dynamic response with some P too, but start with FF0 to get the best mid-range speed accuracy, and then use I-gain to make the speed accurate at other speeds.
If all that you want is a linear response then the linearisation curve component (lincurve) might be simpler than using a PID component.
The following user(s) said Thank You: Niko
Please Log in or Create an account to join the conversation.
Time to create page: 0.336 seconds