Closed tboegi closed 1 year ago
https://github.com/epics-modules/motor/pull/206
The used test case is here: https://github.com/EuropeanSpallationSource/m-epics-ethercatmc/blob/master/test/pytests36/900_Simulator-Softlimits.py (But I don't expect anyone to understand all of it)
@tboegi, thanks for the pull request!
Fixed by #206
Sorry @tboegi , was an oversight on my part! Thanks for fixing
(Currently testing on commit d80b006a39de2853090a1d9574bb0297c2b92e0c)
The introduction of RHLM and RLLM did not consider the use case when MRES < 0: When commanded "forwards", the motor moves "backwards". The soft limits needs to be swapped, depending on the change, either RHLM vs RLLM or DHLM vs DLLM.
As a rule of thumb, RHLM should be updated when SET_HIGH_LIMIT is send to the driver:
if (command == SET_HIGH_LIMIT) { pmr->rhlm = tmp_raw;
I am preparing a patch @kmpeters, should be ready the next days