-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redefining the position of a motor with an absolute encoder #218
Comments
@MarkRivers & @tboegi, do you have thoughts on this? |
@kmpeters For the TwinCAT case, there is a definition of a "homing procedure". So in short: I do it on the driver level as well: |
For the Galil controller, I think it just ignores 'set position' commands for the encoder if there is an absolute encoder. I suspect setting the motor position is still allowed, but the Galil driver will automatically sync the motor to the encoder after a move so if we do try to set motor position it will immediately be set back to match the encoder. So for homing these axes we just set OFF (and we set FOFF=1). However, if the driver didn't auto-sync, we'd need to be able to set the motor position via a motor record SET=1. |
One problem I see is that the motor record redefines the controller's position when the MRES is changed. This is welcome if the MRES is changing because the microstepping level of a stage is changing. It is NOT a welcome change if the EGU is being changed (from mm to um, for example). If the driver doesn't protect against setting the position and a user wants to work in different units, the redefining of the absolute encoder's position is very surprising. |
When changing units it does seem like it would be useful to not automatically set the controller position. Although that's not specific to absolute encoders, right? How would it work? Provide a new field that enables/disables 'set position'? Then if you want to change units, first disable that new field, then change MRES, then enable the new field again? I know some axes or controllers and/or sites have a policy where the controller is always correct, and never want to set position from EPICS. So being able to disable that from the motor record may be useful. |
Users at the APS have changed the MRES because they wanted to change the unit from millimeter to microns. We have also changed the MRES of motors when the number of mini/microsteps on a stepper motor driver are changed. I consider both of these to be normal reasons to change the MRES at runtime. We have changed the MRES for XPS axes to increase the resolution, but this also requires changing the stepSize argument of XPSCreateAxis and restarting the IOC. |
Thanks for sharing the "we need to change MRES" use cases, @kmpeters |
I would not want to add soft motors to a setup unless it was absolutely necessary and there was no other way to achieve the desired effect. Soft motors come with their own quirks and I would expect the addition of the soft motor to cause more problems than it solves. |
There are some situations where it is necessary to disallow redefining the position of an axis with an absolute encoder.
This can be done at the driver level for model-3 motor drivers:
epics-motor/motorAcsMotion@17a0aac
Should this be done at the motor record level instead?
The text was updated successfully, but these errors were encountered: