epics-motor / motorOmsAsyn

EPICS asyn motor drivers for OMS controllers
0 stars 1 forks source link

Improving setPosition when absolute encoders are used #8

Open kmpeters opened 5 months ago

kmpeters commented 5 months ago

The driver uses the LP command to redefine the both the motor and encoder positions. This is a problem when an absolute encoder is used, because there is currently no way to get back to the original absolute encoder scale without resetting the controller.

I asked OMS if there were better ways of handling the setting of positions when absolute encoders were used and this was the reply:

"The controller does not store the offset but stays with that offset as the difference between the absolute encoder reading and the internal encoder position until LP, LPE, or some other command overwrites the encoder position. Using the LO command instead of LP (pg 2-165 of the MAX Command Manual) allows you to only change the motor position, allowing the absolute encoder and encoder position to remain at the same offset from each other.

The SEA command (pg 2-233) allows you to load the encoder position with the current absolute encoder position plus an offset. A related command SMEA (pg 2-238) allows you to load the encoder position and the motor position with the reading from the absolute encoder position."

kmpeters commented 5 months ago

Also:

"EC?; (pg 2-93) Will report whether the axis is configured for incremental or absolute encoder. I for incremental, A for absolute, and B for BiSS absolute encoder."