Jump to content
OMRON Forums

Stepper motor with position confirmation


Recommended Posts

I'm using an ACC24E3 and trying to configure a stepper motor in the mode that

the PPMAC User Manual refers to as 'second option':

The second option is to feed back the pulse train for simulated feedback,

but also to use an encoder for confirmation periodically. In the PMAC3-style IC,

this can all be done in a single channel (it requires two channels on a PMAC2-style IC).


From the Manual, my understanding is that setting Gate3.Chan[j].TimerMode = 3

is the key to freeing up the encoder channel input for the confirmation encoder input:

To implement the second option, the pulse train must be fed back into the channel’s timer circuitry with Gate3.Chan[j].TimerMode set to 3. The Gate3.Chan[j].TimerA register will be used to close the simulated servo loop. The confirming encoder is fed into the channel’s encoder inputs, and Gate3.Chan[j].EncCtrl is set to a value from 0 to 7 (probably 3 or 7) to decode this signal.


I would like to use the timer register as indicated above to avoid the

sub-count interpolation.


I have tried four different configurations listed below, and only two will

successfully run the motor. It appears that unless Gate3[1].Chan[0].EncCtrl = 8,

the motor will not run. In addition it appears that unless I have

EncTable[].pEnc = Gate3[].Chan[].ServoCapt.a the motor will not run either.

Am I missing something that needs to be set to select the pulse and direction

mode, while allowing the encoder channel input to be configured for a quadrature



I am using the file below to download the various configurations, and you

will see from the comments the behavior that I see.





//Common Settings for all configurations below.

Gate3[1].PfmClockDiv = 5;

Gate3[1].EncClockDiv = 3;

Gate3[1].Chan[0].OutFlagD = 1;

Gate3[1].Chan[0].TimerMode = 3;

Gate3[1].Chan[0].PfmWidth = 100;

Gate3[1].Chan[0].OutputPol = 0;

Gate3[1].Chan[0].PfmDirPol = 0;

Gate3[1].Chan[0].OutputMode = 8;

Gate3[1].Chan[0].PackOutData = 0;

Gate3[1].Chan[0].PackInData = 0;












//Configuration #1

//This configuration was kindly posted on the forum by another user, and runs

//the motor fine. Unfortunately it doesn't support using the confirmation encoder.

Gate3[1].Chan[0].EncCtrl = 8;






//Configuration #2

//This was my attempt to configure from the User Manual 'Second Option'

//information and settings, and allow use of the encoder channel

//input for position confirmation only.

//Motor does not run, oscillates/creeps real slow upon jog command, and

//exceeds DAC limit setting.

//Gate3[1].Chan[0].EncCtrl = 3;






//Configuration #3

//This configuration is the same as #2, only changing the .EncCtrl = 8

//No Difference in motor behavior from #2.

//Gate3[1].Chan[0].EncCtrl = 8;






//Configuration #4

//This was a trial to configure from the User Manual 1/T extension method

//using ServoCapt as source register. This the runs the motor fine also,

//but does not support use of the encoder channel for the confirmation encoder.

//Gate3[1].Chan[0].EncCtrl = 8;







Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You definitely don’t want any settings with Gate3.Chan[j].EncCtrl = 8 as this will prevent using the “confirmation” encoder.


If Gate3.Chan[j].TimerMode is set to 3 to feed back the internally generated PFM signal to the Gate3.Chan[j].TimerA register each servo cycle then the units are whole counts, with no fractional-count estimation (low 8 bits always zero). This would make the ECT using your “Common Settings”:

EncTable[13].Type = 1

EncTable[13].pEnc = Gate3[1].Chan[0].TimerA.a

EncTable[13].index1 = 0

EncTable[13].index2 = 0

EncTable[13].index3 = 0

EncTable[13].MaxDelta = 0

EncTable[13].ScaleFactor = 1/256


I don’t see your settings for the output pointer (using your “Common Settings”):



Also the “standard 25Hz bandwidth tuning:

Motor[11].Servo.Kp = 40

Motor[11].Servo.Kvfb = 0

Motor[11].Servo.Kvff = 40

Motor[11].Servo.Ki = 0.001


These settings should allow you to use the "real" encoder channel.

Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...