Closedown

This commit is contained in:
gac-S_Changer
2017-02-27 09:55:51 +01:00
parent 4cdba5c925
commit 28d0049714
3 changed files with 192 additions and 178 deletions

View File

@@ -1,5 +1,3 @@
import threading
class RobotTCP(TcpDevice, Stoppable):
def __init__(self, name, server, timeout = 1000, retries = 1):
TcpDevice.__init__(self, name, server)
@@ -17,7 +15,6 @@ class RobotTCP(TcpDevice, Stoppable):
self.empty = None
self.working_mode = None
self.status = None
self.lock = threading.Lock()
def _sendReceive(self, msg_id, msg = "", timeout = None):
tx = self.header if (self.header != None) else ""
@@ -330,7 +327,7 @@ class RobotTCP(TcpDevice, Stoppable):
#self.setState(State.Busy if self.status=="move" else State.Ready)
if not self.settled: self.setState(State.Busy)
if not self.empty: self.setState(State.Paused)
else self.setState(State.Ready)
else: self.setState(State.Ready)
def doUpdate(self):
try:
@@ -355,12 +352,5 @@ class RobotTCP(TcpDevice, Stoppable):
def on_event(self,ev):
pass
def mount(self, puck, sample):
return self.execute('mount', puck, sample)
add_device(RobotTCP("robot_tcp", "129.129.126.100:1000"), force = True)
robot_tcp.setPolling(100)
#robot_tcp.set_monitor_speed(20)

View File

@@ -7,7 +7,7 @@ from ch.psi.pshell.serial import TcpDevice
from ch.psi.pshell.modbus import ModbusTCP
run("RobotTCP")
run("RobotMX")