Skip to content
Snippets Groups Projects
Commit a14390c0 authored by Generic Bliss account for Control Software's avatar Generic Bliss account for Control Software
Browse files

Cache attr_RobotSpeed_read

parent 8611f68b
No related branches found
No related tags found
No related merge requests found
...@@ -260,7 +260,7 @@ class TomoSampleChanger(Device): ...@@ -260,7 +260,7 @@ class TomoSampleChanger(Device):
self.robot_status_time = now self.robot_status_time = now
self.info_stream ("robot_status() at %d" % int(now)) self.info_stream ("robot_status() at %d" % int(now))
self.status_lock = False self.status_lock = False
# catch all exceptions, convert to Tango exception and rethrow # catch all exceptions, convert to Tango exception and rethrow
except: except:
...@@ -402,7 +402,7 @@ class TomoSampleChanger(Device): ...@@ -402,7 +402,7 @@ class TomoSampleChanger(Device):
self.attr_RemoteMode_read = False self.attr_RemoteMode_read = False
self.attr_ParkingPosition_read = False self.attr_ParkingPosition_read = False
self.attr_SafetyChainOK_read = False self.attr_SafetyChainOK_read = False
self.attr_RobotSpeed_read = "None"
# init flags for state and status # init flags for state and status
self.init_done = False self.init_done = False
self.init_error = None self.init_error = None
...@@ -567,8 +567,9 @@ class TomoSampleChanger(Device): ...@@ -567,8 +567,9 @@ class TomoSampleChanger(Device):
def get_speed(self): def get_speed(self):
# PROTECTED REGION ID(TomoSampleChanger.get_speed) ENABLED START # # PROTECTED REGION ID(TomoSampleChanger.get_speed) ENABLED START #
speed = self.robot.accelForLargeMovesMultiplicator if self.is_moving == False:
return speed self.attr_RobotSpeed_read = self.robot.accelForLargeMovesMultiplicator
return self.attr_RobotSpeed_read
# PROTECTED REGION END # // TomoSampleChanger.get_speed # PROTECTED REGION END # // TomoSampleChanger.get_speed
def set_speed(self, speed): def set_speed(self, speed):
...@@ -793,6 +794,9 @@ class TomoSampleChanger(Device): ...@@ -793,6 +794,9 @@ class TomoSampleChanger(Device):
self.robot.emmergencyStopBlockingPrograms() self.robot.emmergencyStopBlockingPrograms()
self.robot.powerOFF() self.robot.powerOFF()
self.is_moving = False
self.is_error = True
# PROTECTED REGION END # // TomoSampleChanger.Abort # PROTECTED REGION END # // TomoSampleChanger.Abort
@command( @command(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment