Re: Porting EMC to different hardware



Regarding using a tach, Jon Elson is right, the tach feedback usually
goes into the amplifier directly, and the amp closes a velocity loop
using some analog servo that you can tune with a pot right on the amp.
The EMC software never sees this.

It's possible to use the analog input on the Servo To Go to read in the
tach value, but the EMC does a position servo and the velocity isn't
used. If you wanted to use velocity feedback, you could do this:

1. modify emc/src/emcnml/extintf.h and add some declarations for tach
feedback, e.g.,

extern int extVelRead(int axis, double *vel);

2. Modify emc/src/emcmot/extstgmot.c so that it provides this function
using the STG ADC read functions, e.g.,

int extVelRead(int axis, double *vel)
{
  return ADCread(...); /* whatever this is in stg.c */
}

3. Modify the EMC motion controller in emc/src/emcmot/emcmot.c to call
extVelRead(), probably right after extEncoderReadAll().

4. Modify the PID algorithm in emc/src/emcmot/pid.c to use the actual
velocity information instead of doing differencing.

I'm not sure how much of an improvement this would be, but you can try
it and see.

--Fred



Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact