Skip to content
Snippets Groups Projects
Commit a01a68d0 authored by bliss administrator's avatar bliss administrator
Browse files

Uncommitted modifications from October 2019.

parent e0bedb9b
No related branches found
No related tags found
No related merge requests found
......@@ -138,7 +138,7 @@ class TomoSampleChanger(Device):
self.is_error = True
self.is_moving = False
self.is_loaded = False
#self.is_loaded = False
self.write_properties()
#
......@@ -372,10 +372,21 @@ class TomoSampleChanger(Device):
try:
# initialise the robot access
self.robot = id19Controller.ID19Controller(controllerAssociated='id19robot', logOnController=False)
self.robot = id19Controller.ID19Controller(controllerAssociated='id19robot', logOnController=False) # Normal
self.robot.cs8LibraryName = 'id19tomo'
self.robot.autoFirmwareUpdate()
self.robot._prog_display.threadOnController()
self.robot._prog_key_handler.threadOnController()
self.robot.allLightOn()
time.sleep(1)
self.robot.allLightOff()
self.robot.torqueMaxAllowed = {'j1': 9990, 'j2': 9990, 'j3': 9990, 'j4': 9990, 'j5': 9990, 'j6': 9990}
self.robot.torqueMonitor.threadOnController() # If emmergency function used, torque monitor must be reactivated.
# set the robot movements to full speed
self.robot.speed = 100
print ("Controller initialized!!!!!!!")
......@@ -498,7 +509,11 @@ class TomoSampleChanger(Device):
_state = PyTango.DevState.DISABLE
else:
if self.is_moving == True:
_state = PyTango.DevState.MOVING
# pause mode activated
if self.robot.power() == 0:
_state = PyTango.DevState.PAUSE
else:
_state = PyTango.DevState.MOVING
else:
if self.attr_ParkingPosition_read == False:
_state = PyTango.DevState.FAULT
......@@ -527,14 +542,17 @@ class TomoSampleChanger(Device):
if state == PyTango.DevState.DISABLE:
self._status += "DISABLED"
else:
if state == PyTango.DevState.MOVING:
self._status += "MOVING"
self._status += "\n\n" + self.last_task
if state == PyTango.DevState.PAUSE:
self._status += "PAUSE"
else:
if state == PyTango.DevState.ON:
self._status += "ON"
if state == PyTango.DevState.MOVING:
self._status += "MOVING"
self._status += "\n\n" + self.last_task
else:
self._status += "UNKNOWN"
if state == PyTango.DevState.ON:
self._status += "ON"
else:
self._status += "UNKNOWN"
self._status += "\n"
if state == PyTango.DevState.FAULT:
......@@ -569,7 +587,10 @@ class TomoSampleChanger(Device):
self._status += "\nReading of the robot status failed\n"
self._status += "\n"
self._status += str(self.state_error)
else:
if state == PyTango.DevState.PAUSE:
self._status += "\nGo to the robot teach pendant and follows instructions\n"
self.set_status(self._status)
return self._status
......
......@@ -211,10 +211,13 @@
<states name="MOVING" description="Moving to load, unload or align">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</states>
<states name="PAUSE" description="Waiting for restart">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</states>
<states name="FAULT" description="Requested movement failed.">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</states>
<states name="DISABLE" description="annot move due to active interlock condition.">
<states name="DISABLE" description="Cannot move due to active interlock condition.">
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</states>
<preferences docHome="./doc_html" makefileHome="/segfs/tango/cppserver/env"/>
......
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