Encoder support in stepper systems.

More
28 Dec 2011 07:43 #16030 by sheetmetal
Hi,
I'm planning on using a pair of step/direction drives in a special machine I'm building. It will be of the Mitsubishi/Panasonic/Yaskawa sort of universal drive which can accept either step/direction or velocity inputs.
They typically have encoder outputs which you don't need to implement in a classic step/direction setup. They are great though in that they have the simplicity of steppers, but are actually a pretty sophisticated servo. If you stall out one of these drives, they will clear any pending step inputs and flag an error.
So with encoder available it is possible to maintain position through Estop, and the Pico documentation alludes to it. I'm unclear how it's being implemented though. Is encoder used at all times as a check on follower error, or only loaded in an Estop condition? Or is it actually being used in the position loop? I would think trying to use it in a position loop would lead to all sorts of conflicts. Maintaining position during times of servo-off would be sufficient for my purposes.
Is this a driver function, or just a Hal function? Do the Mesa boards also support step with encoder use? I guess if it's in Hal, the answer should be yes.
Thanks for any enlightenment.
lm

Please Log in or Create an account to join the conversation.

More
28 Dec 2011 11:40 #16039 by BigJohnT
Step/Direction and encoders don't really fit well as a closed loop system. A little searching and you can find the technical answer here on the forum somewhere. A normal velocity drive the control (EMC) feeds the drive velocity signal, the drive sends current to the motor and based on feedback from the motor adjusts the current to maintain the velocity requested from the control. The loop is closed with feedback from the ball screw or motor via an encoder usually to the control. So basically the drive and motor feed back are a small loop inside of the main loop if that makes any sense.

I use the Panasonic step/direction servo drives for my business and like them for open loop applications like pick and place and assembly machines that we build.

John

Please Log in or Create an account to join the conversation.

More
28 Dec 2011 15:44 #16040 by PCW
It is possible to do both systems with EMC, that is, just use the encoders to monitor following error or to run a full EMC controlled position loop feeding a step/dir drive.

Running in a EMC controlled position loop is really not a lot different than a standard analog velocity mode servo, the main difference being that the velocity command to the drive is now a step rate (and dir) rather than an analog +-10V signal. The drive would have to "forget" any buffered steps on ESTOP or when not enabled to make this possible.

Both Mesa and Pico systems cards can run in these modes (as can a bare parallel port up to some maximum step rate/encoder counts/s)

Please Log in or Create an account to join the conversation.

More
28 Dec 2011 17:14 #16042 by BigJohnT
What was I thinking about? Driving steppers not servos... I should pay closer attention.

As I understand trying to use steppers with encoders (other than monitor following error) is you can't put them into overdrive if your already at maximum speed and your falling behind in steps. Where as a servo you can keep giving it more power (up to the limit of the drive) to maintain position... or is my mind slipping again?

John

Please Log in or Create an account to join the conversation.

More
28 Dec 2011 17:40 #16043 by aike
I did it one year ago.
You can see:
www.linuxcnc.org/index.php/english/compo...atid=30&id=5487#5489
All is in working condition now.

Please Log in or Create an account to join the conversation.

More
28 Dec 2011 18:10 #16044 by jmelson
sheetmetal wrote:

So with encoder available it is possible to maintain position through Estop, and the Pico documentation alludes to it. I'm unclear how it's being implemented though. Is encoder used at all times as a check on follower error, or only loaded in an Estop condition? Or is it actually being used in the position loop? I would think trying to use it in a position loop would lead to all sorts of conflicts. Maintaining position during times of servo-off would be sufficient for my purposes.

lm

OK, there may be two ways to do this. The normal way is to have EMC read position from the drive's
encoder output at all times, and set following error limits to suit your requirements. This would allow
EMC to follow the machine's actual position even when in E-stop, also. Surprisingly, it does NOT
cause a conflict. If the drive has tight position control, then you set the gain of the PID loop very
low, and EMC/driver/USC board mostly acts as an open-loop step pulse generator, but final
tallying of movement is made from the encoder reading. Switching between closed-loop and
open-loop is fraught with all sorts of edge conditions, it is much better to just run in the
closed-loop mode at all times.

Another way would be to use the drives fault output to signal EMC of that condition and halt all axes.

Jon

Please Log in or Create an account to join the conversation.

More
29 Dec 2011 07:01 #16067 by sheetmetal
Thanks for the replies.
Yes, switching between closed loop with servo off, and open loop with servo on seemed to have difficulties.
Closed loop all the time seems much more straightforward. I guess conceptually it's no different than if I took a standard analog interface board and ran it into a voltage to frequency circuit with pulse outputs. A Panasonic drive is basically like an analog drive pretending to be a stepper after all.

aike. Thanks for the examples. I love real world examples. I just wish I could understand Russian. Looks like you have a nice installation there.
One thing that I noticed in your ini file is that the PID gains are 50,0,0. Jon said PID gains could be low, but I expected a bit of integral gain to bring the axis into position. Were these values determined by experimentation, or by recommendation?

I'll be using the fault outputs from the drives for sure. I want the axis drives to be minimally powered. This system will, I know, be stalled fairly often in the course of operation, and I don't want the drives to be able to damage the hardware. Open loop is unacceptable in such a system, but I like the simplicity of the step/direction hardware.
lm

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.321 seconds
Powered by Kunena Forum