Back to top

CanOpen and Ethercat (CoE) Interpolated Position Notes

Interpolated Position Mode Notes (Ethercat and/or CanOpen):

Update message rate is set in drive parameter FBUS.SAMPLEPERIOD, Object 0X60C2 sub 1.  It is set in increments of 62.5uS.  Example:  I wanted 8mS so I set 0X60C2 sub 1 to “8” and I had to write 0xFD to 0X60C2 sub 2 for the change to take place.

Parameter FBUS.PARAM02, Object 0X36E6, needs to be set to a “1” to turn on the PLL

Position data needs to be written to object 0X60C1 sub 1 in a deterministic manner.  Example:  If you set the update rate to 4mS, then you need to send a new position point every 4mS.  If you don’t, the interpolator will not start.  (The PLL algorithm must see 5 sequential updates, within the time window, before it locks.  See parameter FBUS.SYNCDIST)

0X60C1 is scaled in parameter FB1.PSCALE (object 0X608F sub 1) by the power of two.  Example: “20” is 2^20 or 1048576 counts/rev.  Writing 65536 to 0X608F sub 1 is the same as writing 16 to FB1.PSCALE.

Position feedback is read from object 0X6063.  An example is below.

If Position error, PL.ERR (0X35C5), is to be used; then additional scaling will need to be done.  This scaling can be done by drive parameter, and saved to the drive’s NV memory.  Or it can be done using SDO objects.  Here is an example of setting PL.ERR scale to 16 bit (65536 counts/rev):

DS402.POSFCFEED = 65536 (0X6092 sub 1)

DS402.POSFCSHAFTREV = 1 (0X6092 sub 2)

DS402.POSGEARMOTORREV = 1 (0X6091 sub 1)

DS402.POSGEARSHAFTREV = 1 (0X6091 sub 2)

Just before you step the control word, from 0x0F to 0x1F, you need to set your position command word (0x60C1 sub 1) equal to position feedback (0x6063) or you will get a jump in position.

I have attached a sample CanOpen macro of CanOpen Interpolation position motion control.  It is hardware level commands sent to the drive, with comments.  It was written to be used with a PCAN USB CanOpen dongle device.  The macro used is not very smart so I had no way to check each step of my run up of the control word, 0x6040, to the status word, 0x6041.  My solution was to put in time delays that screwed up the PLL sync to the update rate.  I don’t recommend you doing this because the PLL is used in the interpolator and you will not get the safety function of the drive faulting if the sync is lost.