Moving more than one motor at a time does not verigy SW limits.
The motors can be moved outside limits with mv, mvr, umvr if two motors or more are moved at the same time.
Example:
We have two motors with user SW limits defined.
Door_mrosanes_1 [40]: wm mot43
mot43
User
High 50.0
Current 0.0
Low -50.0
Dial
High Not specified
Current 0.0
Low Not specifiedDoor_mrosanes_1 [41]: wm mot42
mot42
User
High 25.0
Current 0.0
Low -25.0
Dial
High Not specified
Current 0.0
Low Not specified
We apply:
mv mot42 101 mot43 141
And we get:
Door_mrosanes_1 [43]: wm mot42
mot42
User
High 25.0
Current 101.0
Low -25.0
Dial
High Not specified
Current 101.0
Low Not specifiedDoor_mrosanes_1 [44]: wm mot43
mot43
User
High 50.0
Current 141.0
Low -50.0
Dial
High Not specified
Current 141.0
Low Not specified
This is because sardana creates a MotorGroup without the proper configuration. The MotorGroup should recalculate the limits every time before writing the positions.
If we update the limits, e.g. at the _start method of the MotorGroup (sardana.taurus.core.tango.pool) it solves the bug.
Here I attached the code (I'm sure that I can be done in a easier way)