View Full Version : A question about servo control


Ubarch
06-26-2005, 12:42 PM
Hello,

I'm posting in this forum because a myself and a friend are planning to interface EMC with our own servo controllers. From reading the linuxcnc.org handbook, it seems that they support servo control through the Servo To Go board. It looks like we'll have to understand this code to make EMC communicate with our board. Is this correct, or should we be looking somewhere else in the source?

I'm also hoping that someone can clear up a little bit of fogginess about what exactly EMC sends to a servo controller, and what it expects back. I'm assuming that the PID filter is on the controller (or are people calling an H-bridge a controller? ), and if this is the case, does EMC send a stream of position/velocity data? If so, is there a document that specifies this? What kind of feedback does EMC want from the encoders (ie, does the controller have to process the encoder output at all) ?

Most importantly, does EMC handle synchronization between servos? I'll give an example to illustrate my question. Lets say that the mill is cutting some material with a heavy grain, and the X motor must work harder than the Y motor to cut equivalently. Lets also say that the servo controller is told to cut a line of slope = 1, meaning that the X and Y servos should move at the same speed. If the proportional element of both PID filters is equal, it should take the X motor a longer amount of time to apply the required power. Does EMC take this into account and slow the Y servo? Is this expected of the servo controller?

Thanks for any help you can give. I know we have a lot of reading and code-grokking ahead of us, but if anyone can save us some time and point us to where the correct information is, that would be greatly appreciated.

Al_The_Man
06-26-2005, 12:58 PM
I was looking into this some time back, I thought maybe that EMC had developed an interface for the dedicated type of servo card as in Galil, Delt-Tau etc, but as far as I can tell it is still software oriented and uses the common step and direction control through the parallel port to 'intelligent' drives, in other words the loop is not closed in the CNC software or controller, and in that case it does not appear that EMC integrates the servo encoder loop.
I hope someone can prove me wrong.
Al.

Dan Falck
06-26-2005, 08:11 PM
get an IRC client and do this:

IRC - Not technically a mailing list, but developers meet regularly on Internet Relay Chat
Meetings are typically at 10AM Eastern Time (USA) or 14:00 GMT on Sundays, but
discussions can and do occur at any time.
IRC host is: irc.freenode.net
Channel to join is: #emc

Ask there for some help in writing software for you servo control board. Pual Corner (paul_c in IRC) has written a few drivers for servo boards,as have others there.
Yes, EMC does support real closed loop control and was set up for servos long before a driver for steppers was written. Step and direction control was a request that was written for hobbiests, like me.
Also, get on the EMC developer's list http://sourceforge.net/mailarchive/forum.php?forum=emc-developers and ask some questions there. That is where you will get code questions answered.

Thanks,
Dan

ESjaavik
08-06-2005, 05:20 AM
I was looking into this some time back, I thought maybe that EMC had developed an interface for the dedicated type of servo card as in Galil, Delt-Tau etc, but as far as I can tell it is still software oriented and uses the common step and direction control through the parallel port to 'intelligent' drives, in other words the loop is not closed in the CNC software or controller, and in that case it does not appear that EMC integrates the servo encoder loop.
I hope someone can prove me wrong.
Al.

Ahh! For once I caught you wrong!! :p

It does. In fact it even does this when running stepper motors.
You have several driver options. The ones I have used are:
Parallel port direct (freqmod) is one (I don't recommend it).
Now I use Pico-Systems Universal Stepper Controller. I'm thoroughly impressed! It drives the steppers very smoothly. They sound and move like servos. This hardware can use steppers with or without encoders, or with linear encoders by flipping some DIP switches. If no encoders, the step outputs are run directly back to the position counters, so the closed loop does not embrace the screw/axis. Nice thing is I can just put in an encoder, connect it and flip the switches if there is a need.

In both cases the PID values have to be tuned. There are also 3 FF terms.
Whether this is a good thing when using servo drives with their own PID controller is one thing I find interesting. But I guess a P of unity and the others to zero would pass on those resposibilities to the drive?

I'll probably find out, as I have a BLDC servo system I will set up with EMC.

For other drive options I'll have to pass you on to www.linuxcnc.org, as I have not tried them. But I'm pretty sure they all have the PID running inside EMC. The user interface also have a logger/plotter that is very nice when tuning the PID. I did not realise this in the beginning, but once I was told of it, it made the motor tuning a one evening affair.