This commit is contained in:
gac-S_Changer
2018-07-06 09:56:19 +02:00
parent 4371d9c6d8
commit 4c38bcba7c
34 changed files with 1820 additions and 968 deletions

View File

@@ -4,6 +4,7 @@
import traceback
from ch.psi.pshell.serial import TcpDevice
from ch.psi.pshell.modbus import ModbusTCP
import ch.psi.mxsc.Controller as Controller
run("setup/Layout")
@@ -60,6 +61,16 @@ def system_check(robot_move=True):
if not guiding_tool_park().read():
raise Exception("Guiding tool not parked")
def get_puck_elect_detection(segment, puck):
return str(Controller.getInstance().getPuck(str(segment).upper() + str(puck)).detection)
def get_puck_img_detection(segment, puck):
return str(Controller.getInstance().getPuck(str(segment).upper() + str(puck)).imageDetection)
def assert_puck_detected(segment, puck):
if get_puck_detection(segment, puck) != "Present":
raise Exception ("Puck " + str(segment).upper() + str(puck) + " not present")
def start_puck_detection():
run("tools/RestartPuckDetection")