Menu

#414 Moving more than one motor at a time does not verify SW limits

unassigned
waiting
nobody
None
pool-motion
bug
2016-04-29
2015-12-03
marc
No

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 specified

Door_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 specified

Door_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

Discussion

  • marc

    marc - 2015-12-03
    • summary: Moving more than one motor at a time does not verigy SW limits --> Moving more than one motor at a time does not verify SW limits
     
  • Carlos Falcon

    Carlos Falcon - 2015-12-22

    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)

        def _start(self, *args, **kwargs):
            new_pos = args[0]
            _hight = float('inf')
            _low = float('-inf')
            for motname in self.getMotorNames():
                import taurus
                mot = taurus.Device(motname)
                low, hight = mot.getPositionObj().getLimits()
                if float(low) > _low:
                    _low = float(low)
                if float(hight) < _hight:
                    _hight = float(hight)
    
            self.getPositionObj().setLimits(_low, _hight)
    
     
  • Zbigniew Reszela

    • Milestone: unassigned --> Jan16
     
  • Zbigniew Reszela

    • Milestone: Jan16 --> unassigned