Closedown
This commit is contained in:
@@ -8,10 +8,10 @@ jf5=ch.psi.pshell.modbus.AnalogInput|robot_modbus 4||100|
|
||||
jf6=ch.psi.pshell.modbus.AnalogInput|robot_modbus 5||100|
|
||||
robot_sts=ch.psi.pshell.modbus.AnalogInputArray|robot_modbus 6 6||100|
|
||||
robot_cmd=ch.psi.pshell.modbus.AnalogOutput|robot_modbus 12|||
|
||||
robot_args=ch.psi.pshell.modbus.AnalogOutputArray|robot_modbus 47 6|||
|
||||
robot_args=ch.psi.pshell.modbus.AnalogOutputArray|robot_modbus 47 12|||
|
||||
robot_req=ch.psi.pshell.modbus.AnalogOutput|robot_modbus 13|||
|
||||
robot_ack=ch.psi.pshell.modbus.AnalogInput|robot_modbus 14|||
|
||||
robot_ret=ch.psi.pshell.modbus.AnalogInputArray|robot_modbus 15 6|||
|
||||
robot_ret=ch.psi.pshell.modbus.AnalogInputArray|robot_modbus 15 12|||
|
||||
dewar=ch.psi.pshell.modbus.ModbusTCP|SF-TEST-WAGO1:502|||
|
||||
relays=ch.psi.pshell.modbus.DigitalOutputArray|dewar 0 16||1000|
|
||||
relay1=ch.psi.pshell.modbus.DigitalOutput|dewar 0||1000|
|
||||
|
||||
@@ -41,12 +41,14 @@ class RobotModbus(DeviceBase):
|
||||
if robot_ack.read() != 0:
|
||||
raise Exception("Robot is not ready")
|
||||
robot_cmd.write(command)
|
||||
args = [0,0,0,0,0,0]
|
||||
args = [0] * robot_args.size
|
||||
index = 0
|
||||
for arg in argv:
|
||||
args[index] = arg
|
||||
index = index + 1
|
||||
robot_args.write(to_array(args, 'i'))
|
||||
if index == robot_args.size:
|
||||
raise Exception("Invalid number of arguments")
|
||||
robot.write(to_array(args, 'i'))
|
||||
try:
|
||||
self.request()
|
||||
err = robot_ack.take()
|
||||
|
||||
Reference in New Issue
Block a user