diff --git a/config/config.properties b/config/config.properties index f6a2e08..5d22e9c 100644 --- a/config/config.properties +++ b/config/config.properties @@ -1,4 +1,4 @@ -#Mon Dec 03 12:22:43 CET 2018 +#Wed Dec 12 09:19:49 CET 2018 autoSaveScanData=true commandExecutionEvents=false createSessionFiles=true @@ -20,7 +20,7 @@ notificationLevel=null scanStreamerPort=-1 serverEnabled=true serverPort=8080 -simulation=true +simulation=false terminalEnabled=false terminalPort=3579 userAuthenticator= diff --git a/config/devices.properties b/config/devices.properties index 9c89763..7f3bcad 100644 --- a/config/devices.properties +++ b/config/devices.properties @@ -5,65 +5,42 @@ #cam=ch.psi.pshell.epics.AreaDetector|MX-SAMCAM||| microscan=ch.psi.pshell.serial.TcpDevice|MicroHAWK38C528:2001||| microscan_cmd=ch.psi.pshell.serial.TcpDevice|MicroHAWK38C528:2003||| -ue=LaserUE|COM4|||false -puck_detection=ch.psi.mxsc.PuckDetection|tell-raspberrypi:5556||| -#onewire=ch.psi.pshell.serial.TcpDevice|129.129.126.83:5000||| -#robot=RobotTcp|127.0.0.1:1000||| -#$robot_modbus=ch.psi.pshell.modbus.ModbusTCP|129.129.126.100:502||| -#jf1=ch.psi.pshell.modbus.AnalogInput|robot_modbus 0||100| -#jf2=ch.psi.pshell.modbus.AnalogInput|robot_modbus 1||100| -#jf3=ch.psi.pshell.modbus.AnalogInput|robot_modbus 2||100| -#jf4=ch.psi.pshell.modbus.AnalogInput|robot_modbus 3||100| -#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 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 12||| -wago=ch.psi.pshell.modbus.ModbusTCP|wago-mxsc-1:502||| +$ue=LaserUE|COM4|||false +puck_detection=ch.psi.mxsc.PuckDetection|tell6s-raspberrypi:5556||| +wago=ch.psi.pshell.modbus.ModbusTCP|tell6s-wago:502||| led_ok_1=ch.psi.pshell.modbus.DigitalInput|wago 0||1000| led_ok_2=ch.psi.pshell.modbus.DigitalInput|wago 1||1000| led_ok_3=ch.psi.pshell.modbus.DigitalInput|wago 2||1000| feedback_local_safety=ch.psi.pshell.modbus.DigitalInput|wago 3||1000| feedback_psys_safety=ch.psi.pshell.modbus.DigitalInput|wago 4||1000| -filling_phase_separator=ch.psi.pshell.modbus.DigitalInput|wago 5||1000| -filling_dewar=ch.psi.pshell.modbus.DigitalInput|wago 6||1000| -dewar_level_high_alarm=ch.psi.pshell.modbus.DigitalInput|wago 7||1000| -guiding_tool_park=ch.psi.pshell.modbus.DigitalInput|wago 8||1000| -air_pressure_ok=ch.psi.pshell.modbus.DigitalInput|wago 9||1000|false -n2_pressure_ok=ch.psi.pshell.modbus.DigitalInput|wago 10||1000| -#spare_di_1=ch.psi.pshell.modbus.DigitalInput|wago 11||| -#spare_di_2=ch.psi.pshell.modbus.DigitalInput|wago 12||| -#spare_di_3=ch.psi.pshell.modbus.DigitalInput|wago 13||| -#spare_di_4=ch.psi.pshell.modbus.DigitalInput|wago 14||| -he_chamber_valve_1=ch.psi.pshell.modbus.DigitalInput|wago 15||1000| -he_chamber_valve_2=ch.psi.pshell.modbus.DigitalInput|wago 16||1000| -smc_magnet_status=ch.psi.pshell.modbus.DigitalInput|wago 17||1000| -smc_mounted_1=ch.psi.pshell.modbus.DigitalInput|wago 18||1000| -smc_mounted_2=ch.psi.pshell.modbus.DigitalInput|wago 19||1000| +filling_dewar=ch.psi.pshell.modbus.DigitalInput|wago 5||1000| +dewar_level_high_alarm=ch.psi.pshell.modbus.DigitalInput|wago 6||1000| +guiding_tool_park=ch.psi.pshell.modbus.DigitalInput|wago 7||1000| +air_pressure_ok=ch.psi.pshell.modbus.DigitalInput|wago 8||1000|false +n2_pressure_ok=ch.psi.pshell.modbus.DigitalInput|wago 9||1000| +smc_magnet_status=ch.psi.pshell.modbus.DigitalInput|wago 10||1000| +smc_mounted_1=ch.psi.pshell.modbus.DigitalInput|wago 11||1000| +smc_mounted_2=ch.psi.pshell.modbus.DigitalInput|wago 12||1000| +#spare_di_1=ch.psi.pshell.modbus.DigitalInput|wago 13||| +#spare_di_2=ch.psi.pshell.modbus.DigitalInput|wago 14||| +#spare_di_3=ch.psi.pshell.modbus.DigitalInput|wago 15||| +#spare_di_4=ch.psi.pshell.modbus.DigitalInput|wago 16||| relays=ch.psi.pshell.modbus.DigitalOutputArray|wago 0 16||1000| release_local_safety=ch.psi.pshell.modbus.DigitalOutput|wago 0||| release_psys_safety=ch.psi.pshell.modbus.DigitalOutput|wago 1||| -ln2_main_power=ch.psi.pshell.modbus.DigitalOutput|wago 2||| -rim_heater=ch.psi.pshell.modbus.DigitalOutput|wago 3||| -phase_separator_ln2=ch.psi.pshell.modbus.DigitalOutput|wago 4||| -dewar_ln2=ch.psi.pshell.modbus.DigitalOutput|wago 5|||false -valve_he_chamber=ch.psi.pshell.modbus.DigitalOutput|wago 6||| -gripper_dryer=ch.psi.pshell.modbus.DigitalOutput|wago 7||| -valve_1=ch.psi.pshell.modbus.DigitalOutput|wago 8||| -valve_2=ch.psi.pshell.modbus.DigitalOutput|wago 9||| -valve_3=ch.psi.pshell.modbus.DigitalOutput|wago 10||| -valve_4=ch.psi.pshell.modbus.DigitalOutput|wago 11||| -#spare_do_1=ch.psi.pshell.modbus.DigitalOutput|wago 12||| -smc_sup_det=ch.psi.pshell.modbus.DigitalOutput|wago 13||| -#spare_do_3=ch.psi.pshell.modbus.DigitalOutput|wago 14||| -#spare_do_4=ch.psi.pshell.modbus.DigitalOutput|wago 15||| -phase_separator_level=ch.psi.pshell.modbus.ReadonlyProcessVariable|wago 0||10000| -dewar_level=ch.psi.pshell.modbus.ReadonlyProcessVariable|wago 1||10000| -rim_heater_temp=ch.psi.pshell.modbus.ReadonlyProcessVariable|wago 2||10000| -#spare_ai_1=ch.psi.pshell.modbus.AnalogInput|wago 3|||true +#spare_do_1=ch.psi.pshell.modbus.DigitalOutput|wago 2||| +#spare_do_2=ch.psi.pshell.modbus.DigitalOutput|wago 3||| +#spare_do_3=ch.psi.pshell.modbus.DigitalOutput|wago 4||| +gripper_dryer=ch.psi.pshell.modbus.DigitalOutput|wago 5||| +smc_sup_det=ch.psi.pshell.modbus.DigitalOutput|wago 6||| +valve_1=ch.psi.pshell.modbus.DigitalOutput|wago 7||| +valve_2=ch.psi.pshell.modbus.DigitalOutput|wago 8||| +valve_3=ch.psi.pshell.modbus.DigitalOutput|wago 9||| +valve_4=ch.psi.pshell.modbus.DigitalOutput|wago 10||| +dewar_level=ch.psi.pshell.modbus.ReadonlyProcessVariable|wago 0||10000| +rim_heater_temp=ch.psi.pshell.modbus.ReadonlyProcessVariable|wago 1||10000| +#spare_ai_1=ch.psi.pshell.modbus.AnalogInput|wago 2|||false +#spare_ai_2=ch.psi.pshell.modbus.AnalogInput|wago 3||| smc_current_rb=ch.psi.pshell.modbus.ReadonlyProcessVariable|wago 4||1000| #spare_ai_3=ch.psi.pshell.modbus.AnalogInput|wago 5||| #spare_ai_4=ch.psi.pshell.modbus.AnalogInput|wago 6||| @@ -72,9 +49,3 @@ led_ctrl_1=ch.psi.pshell.modbus.ProcessVariable|wago 0||| led_ctrl_2=ch.psi.pshell.modbus.ProcessVariable|wago 1||| led_ctrl_3=ch.psi.pshell.modbus.ProcessVariable|wago 2||| smc_current=ch.psi.pshell.modbus.ProcessVariable|wago 3||| -#img_back=ch.psi.pshell.imaging.CameraSource|cam||-100| -#fx=ch.psi.pshell.epics.Motor|SAR-EXPMX:MOT_FX|||true -#fy=ch.psi.pshell.epics.Motor|SAR-EXPMX:MOT_FY|||true -#ry=ch.psi.pshell.epics.Motor|SAR-EXPMX:MOT_ROT_Y|||true -#cz=ch.psi.pshell.epics.Motor|SAR-EXPMX:MOT_CZ|||true -#cx=ch.psi.pshell.epics.Motor|SAR-EXPMX:MOT_CX|||true diff --git a/config/plugins.properties b/config/plugins.properties index 1568671..a3380ea 100644 --- a/config/plugins.properties +++ b/config/plugins.properties @@ -9,7 +9,6 @@ HexiposiPanel.java=enabled MjpegSource2.java=enabled LN2.java=disabled Hexiposi.java=disabled -NewJPanel.java=disabled RobotPanel.java=enabled SmartMagnetConfig.java=disabled SmartMagnetPanel.java=enabled diff --git a/plugins/MXSC-1.10.0.jar b/plugins/MXSC-1.10.0.jar index 5e3025c..dd0ba72 100644 Binary files a/plugins/MXSC-1.10.0.jar and b/plugins/MXSC-1.10.0.jar differ diff --git a/script/data/samples.py b/script/data/samples.py index f6ba272..44064a2 100644 --- a/script/data/samples.py +++ b/script/data/samples.py @@ -48,7 +48,7 @@ def restore_samples_info(): set_samples_info(info) def get_samples_info(as_json=True): - global samples_info + global samples_info return json.dumps(to_list(samples_info)) if as_json else samples_info def has_puck_datamatrix(datamatrix): diff --git a/script/devices/RobotSC.py b/script/devices/RobotSC.py index f878be7..d0289e8 100644 --- a/script/devices/RobotSC.py +++ b/script/devices/RobotSC.py @@ -268,10 +268,7 @@ class RobotSC(RobotTCP): if simulation: add_device(RobotSC("robot","localhost:1000"),force = True) else: - #add_device(RobotSC("robot", "129.129.243.120:1000"), force = True) - #add_device(RobotSC("robot", "pcp068129.psi.ch:1000"), force = True) - #add_device(RobotSC("robot", "saresb-cons-06.psi.ch:1000"), force = True) - add_device(RobotSC("robot", "129.129.243.90:1000"), force = True) + add_device(RobotSC("robot", "TellRobot6S:1000"), force = True) robot.set_default_desc(DESC_DEFAULT) diff --git a/script/devices/RobotTCP.py b/script/devices/RobotTCP.py index e2a0454..c701a48 100644 --- a/script/devices/RobotTCP.py +++ b/script/devices/RobotTCP.py @@ -382,8 +382,13 @@ class RobotTCP(TcpDevice, Stoppable): def resume(self): self.evaluate("restartMove()") - def reset_motion(self, joint=None): - self.evaluate("resetMotion()" if (joint is None) else ("resetMotion(" + joint + ")")) + def reset_motion(self, joint=None, timeout=None): + #TODO: in new robot robot.resetMotion() is freezing controller + #self.evaluate("resetMotion()" if (joint is None) else ("resetMotion(" + joint + ")")) + if joint is None: + self.execute('reset', timeout=timeout) + else: + self.execute('reset', str(joint), timeout=timeout) def is_empty(self): self.empty = self.eval_bool("isEmpty()") @@ -652,6 +657,7 @@ class RobotTCP(TcpDevice, Stoppable): self.setState(State.Offline) #Cartesian space + """ def get_flange_pos(self): return self.eval_pnt("jointToPoint(" +FLANGE + ", " + self.frame + ", herej())") @@ -660,6 +666,21 @@ class RobotTCP(TcpDevice, Stoppable): return self.eval_pnt("jointToPoint(" + self.tool + ", " + self.frame + ", herej())") #self.set_jnt(self.herej()) #return self.joint_to_point(tool, frame) + """ + + #TODO: in new robot robot.evaluate("tcp_p=jointToPoint(tSuna, world, herej())") is freezing controller (cannot cal herej directly) + #We can consider atomic because tcp_j is only accessed in comTcp + def get_flange_pos(self): + self.evaluate("tcp_j=herej(); tcp_p=jointToPoint(" +FLANGE + ", " + self.frame + ", tcp_j)") + return self.get_pnt() + + def get_cartesian_pos(self): + self.assert_tool() + self.evaluate("tcp_j=herej(); tcp_p=jointToPoint(" + self.tool + ", " + self.frame + ", tcp_j)") + return self.get_pnt() + #self.set_jnt(self.herej()) + #return self.joint_to_point(tool, frame) + def get_cartesian_destination(self): self.assert_tool() diff --git a/script/devices/Wago.py b/script/devices/Wago.py index 1ce7931..d76a5b0 100644 --- a/script/devices/Wago.py +++ b/script/devices/Wago.py @@ -2,37 +2,6 @@ LED_LEVEL_ROOM_TEMPERATURE = 0.4 LED_LEVEL_LN2 = 1.0 -""" -wago=ch.psi.pshell.modbus.ModbusTCP|wago-mxsc-1:502||| -relays=ch.psi.pshell.modbus.DigitalOutputArray|wago 0 16||1000| -release_local_safety=ch.psi.pshell.modbus.DigitalOutput|wago 0||| -release_psys_safety=ch.psi.pshell.modbus.DigitalOutput|wago 1||| -ln2_main_power=ch.psi.pshell.modbus.DigitalOutput|wago 2||| -rim_heater=ch.psi.pshell.modbus.DigitalOutput|wago 3||| -phase_separator_ln2=ch.psi.pshell.modbus.DigitalOutput|wago 4||| -dewar_ln2=ch.psi.pshell.modbus.DigitalOutput|wago 5|||false -valve_he_chamber=ch.psi.pshell.modbus.DigitalOutput|wago 6||| -gripper_dryer=ch.psi.pshell.modbus.DigitalOutput|wago 7||| -valve_1=ch.psi.pshell.modbus.DigitalOutput|wago 8||| -valve_2=ch.psi.pshell.modbus.DigitalOutput|wago 9||| -valve_3=ch.psi.pshell.modbus.DigitalOutput|wago 10||| -valve_4=ch.psi.pshell.modbus.DigitalOutput|wago 11||| -#spare_do_1=ch.psi.pshell.modbus.DigitalOutput|wago 12||| -#spare_do_2=ch.psi.pshell.modbus.DigitalOutput|wago 13||| -#spare_do_3=ch.psi.pshell.modbus.DigitalOutput|wago 14||| -#spare_do_4=ch.psi.pshell.modbus.DigitalOutput|wago 15||| -phase_separator_level=ch.psi.pshell.modbus.ReadonlyProcessVariable|wago 0||1000| -dewar_level=ch.psi.pshell.modbus.ReadonlyProcessVariable|wago 1||1000| -rim_heater_temp=ch.psi.pshell.modbus.ReadonlyProcessVariable|wago 2||1000| -air_pressure=ch.psi.pshell.modbus.ReadonlyProcessVariable|wago 3||1000| -n2_pressure=ch.psi.pshell.modbus.ReadonlyProcessVariable|wago 4||1000| -#spare_ai_1=ch.psi.pshell.modbus.AnalogInput|wago 5||| -#spare_ai_2=ch.psi.pshell.modbus.AnalogInput|wago 6||| -#spare_ai_3=ch.psi.pshell.modbus.AnalogInput|wago 7||| -led_ctrl_1=ch.psi.pshell.modbus.ProcessVariable|wago 0||| -led_ctrl_2=ch.psi.pshell.modbus.ProcessVariable|wago 1||| -led_ctrl_3=ch.psi.pshell.modbus.ProcessVariable|wago 2||| -""" ################################################################################################### # Leds ###################################################################################################