Steppers & Linear encoders
Question: Is there a way to run a Stepper in combination with the linear encoders like a servo motor? (closed loop)
At the moment i've installed the linear encoders to get position- feedback and to stop the machine if there is an error.
Think that there should be a possibility to run the steppers like servos...
regards, Thomas
Please Log in or Create an account to join the conversation.
As for the steppers with encoders I'm not exactly sure but have seen discussion on this before.
These are some links to some info on feedback with steppers.
wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Steppers_With_Encoders
wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Com..._Devices_On_One_Axis
John
Please Log in or Create an account to join the conversation.
I know more or less how closed loop Pid works but i do not know how to connect em to the StepGen provided by the mesa haldriver,
is there a example how to integrate the stepgen in the pid?
regards Thomas
Please Log in or Create an account to join the conversation.
I know more or less how closed loop Pid works but i do not know how to connect em to the StepGen provided by the mesa haldriver,
is there a example how to integrate the stepgen in the pid?
regards Thomas
I don't know of any...
Just looking at my 5i20 configuration in the HAL configuration window I see that the stepgen only has two input pins enable and position-cmd. So I'm guessing you can't use any feedback directly on the stepgen. Maybe PCW or Seb might know a way.
John
Please Log in or Create an account to join the conversation.
is there a example how to integrate the stepgen in the pid?
Well, doing it in HAL is not that complicated.
The problem is with the results.
The idea is that steppers have a different torque/velocity curve than a regular servo.
If a servo gets behind the commanded position you simply increase the power so it catches up.
When a step motor gets behind commanded position it's usually because it doesn't have enough power. Increasing the command to it will only get it to lose more steps, and stall eventually (actually quite fast).
The only thing you could do is connect the position error (difference between commanded and feedback) to the adaptive-feed input to the motion controller. That way emc2 will slow down all axes if one motor starts to fall behind. In this case one can only hope the motor which started to fail will magically heal itself and catch up eventually.
It is (in theory) possible to drive a stepper like a servo, but you need a really high count encoder for that. At least 100 pulses / motor step. And you need to have a control (pc), drive, motor-encoder combination that can do things together. This only works if the PC control talks to the step driver and together they can decide on slowing down, increasing, etc.
And if you consider more than one axis, which all move synchronized, you see why it easily gets problematic.
I think the best way to make a stepper system work is to design it properly, so that it's never close to areas where it can stall or lose steps.
If you have encoders/linear encoders and you can watch if an motor stalls it's even better. IMO a motor will only stall if you had a collision, or something else which isn't part of a regular machine operation cycle.
Regards,
Alex
Please Log in or Create an account to join the conversation.
Just looking at my 5i20 configuration in the HAL configuration window I see that the stepgen only has two input pins enable and position-cmd. So I'm guessing you can't use any feedback directly on the stepgen. Maybe PCW or Seb might know a way.
It works like this: motion -> pid -> stepgen, the feedback goes back to pid, not to stepgen.
Regards,
Alex
Please Log in or Create an account to join the conversation.
In the german forum i had the following idea, tell me if im wrong...
if the stepgen has to move ie 100mm the encoder gives us at the end of the move the absolute position.
So lets move not 100mm, let us move just 99mm and keep the 1mm differenc as a constant, lets say "A"
Example: Desired move: 100mm, - Constant "A" -> move just 99mm
Compare the actual Position given by the Linear encoder with the 99mm
i.E. "real" Position ist now 98mm.
At this moment we know that we need 2mm (Constant "A" + difference 99-98mm).
Now let the stepper move the remaining 2mm (just stepping)
result: Any kind of error (backlash) is nearly eliminated,
Backlash is eliminated cause we move in the same direction -> gets near "0"
Lenght error of the ballscrew: is nearly eliminated cause this error is normaly bigger if you move long distances and very small if you move a short distance...
Thought about a kind of "StepGen" - Dummy that will be connected between axis.* and the "real" Stepgen
Would this be a way to integrate linear-encoders into emc without dealing with pids,control loops etc... ???
regards Thomas
Please Log in or Create an account to join the conversation.
www.linuxcnc.org/docview/html//config_ini_config.html#sub:[AXIS]-section
Not sure if this is what your trying to accomplish, but I thought I'd give it a stab.
Regards,
John
Please Log in or Create an account to join the conversation.
The encoders provide a excellent position- value and they avoid errors inside the drive/screw/motor combination cause they are mounted directly on the table. So reading the encoders gives us the "real" position. The accuracy of a machine with linear encoders like heidenhain integrated in their cnc- control is a dream for each machinist. Running steppers closed loop is really difficult (ok, it is running on my machine but not as good as i excpected)
My intention was using the steppers (NOT CLOSED LOOP, JUST STEPPING) and try to compensate the resulting error (Targetposition/effective Postion given by the linear encoder) "stepping" near the desired position
Screw- Pitch errors occur when the temperature changes, linear encoders are more or less resistant against temperature changes,
Please Log in or Create an account to join the conversation.
EMC has the comp file ability so I'm wondering out loud what it would take to have adaptive compensation. Since your not looking to make up for lost steps (usually from a stalled stepper) but for inaccuracy in the drive mechanics it kinda makes sense to me.
On another note, I'm working on a THC that basicly hijacks the axis.n.motor-pos-cmd and adds to or subtracts from the stepgen.n.position-cmd as needed to maintain the proper tip voltage. It's not done yet as there is a lot to consider. You might think about writing a comp to add your scale.
Regards,
John
Please Log in or Create an account to join the conversation.