It is not possible to read motor's position when it is out of it's limits (out of range of Tango attribute "position"). One can reproduce it in the following way:
Door_zreszela_1 [32]: mot01.position = -2 Door_zreszela_1 [33]: %set_lim mot01 -1 0 mot01 limits set to -1.0000 0.0000 (user units) Door_zreszela_1 [34]: mot01.position API_WAttrOutsideLimit: Set value for attribute Position is below the minimum authorized (at least element 0) (For more detailed information type: tango_error)
This behavior does not happen with a normal Tango device (not Sardana).
We have analyzed this bug some months ago with the following results.
This bug is caused by a Tango feature, which protects the attribute set value against updates out of the attribute range. We consider that it should disappear when feature [#286] gets implemented.
Meanwhile we have evaluated two workarounds. They should be considered only in case that the attribute set value is out of the limits. Keeping in mind that the position attribute is a function of several attributes e.g. offset, sign, etc.
https://sourceforge.net/p/sardana/mailman/message/33086725)
Regarding solution 1, it could be dangerous in case that the Pool DS dies in the middle of the operation. In this case it could leave the Tango database with the erroneous limits.
Regarding solution 2, it may affect the "drift correction" - to be investigated,
and the pending operation feature of Taurus GUIs.
We could also investigate, how to avoid the limits check of the set value on the Tango level.
In any case, we should look for the less harmful workaround, meanwhile the feature [#286] is implemented.
Related
OLD Tickets: #286
Patch for solving this:
https://sourceforge.net/p/sardana/mailman/message/34220364/
has been applied.