epics-modules / motor

APS BCDA synApps module: motor
https://epics-modules.github.io/motor/
20 stars 46 forks source link

Motor can be tweaked/moved further when sitting on a limit switch #212

Open tboegi opened 6 months ago

tboegi commented 6 months ago

A spin off from: https://github.com/epics-modules/motor/pull/211

General problem: When a motor is sitting on a limit switch, the motorRecord inhibits/forbids/does not allow movevements towards the same direction. E.g. when LLS is activated, HOMR and JOGR do not command any motion to the controller. However, using TWR or putting a "lower value" into .VAL, .DVAL .RVAL field will command the motor. (Note that the exact combination is dependent on the sign of MRES and the .DIR field, so that the problem is more complex) One thing to keep in mind is that it should be possible to move away from the limit switch. Another thing to remember is that some controllers only have one hardware signal, and instead of filtering that in the controller specific driver, the motorRecord needs to fiddle with CDIR.

It would be good to have this fixed/improved.

tboegi commented 6 months ago

I just realized that the ess version already has this kind of check: https://github.com/epics-modules/motor/commit/b47408f379ca87a11dff8a1b6832c867980c91d6

https://github.com/EuropeanSpallationSource/motor/blob/ess-master/motorApp/MotorSrc/motorRecord.cc#L1046-L1480