diff --git a/config/devices.properties b/config/devices.properties index bd8c792..de674d5 100644 --- a/config/devices.properties +++ b/config/devices.properties @@ -1,7 +1,7 @@ img=ch.psi.pshell.prosilica.Prosilica|25001 "PacketSize=1522;PixelFormat=Mono8;BinningX=1;BinningY=1;RegionX=300;RegionY=200;Width=1000;Height=1000"|||false gripper_cam=ch.psi.pshell.imaging.MjpegSource|http://129.129.110.114/axis-cgi/mjpg/video.cgi||100| -microscan=ch.psi.pshell.serial.TcpDevice|129.129.100.200:2001||| -microscan_cmd=ch.psi.pshell.serial.TcpDevice|129.129.100.200:2003||| +microscan=ch.psi.pshell.serial.TcpDevice|129.129.110.200:2001||| +microscan_cmd=ch.psi.pshell.serial.TcpDevice|129.129.110.200:2003||| ue=LaserUE|COM4|||false #robot=RobotTcp|127.0.0.1:1000||| #onewire=ch.psi.pshell.serial.TcpDevice|129.129.126.83:5000||| @@ -32,8 +32,15 @@ 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| 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||| @@ -48,20 +55,20 @@ 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||| +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| -air_pressure=ch.psi.pshell.modbus.ReadonlyProcessVariable|wago 3||10000| -n2_pressure=ch.psi.pshell.modbus.ReadonlyProcessVariable|wago 4||10000| -#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||| +#spare_ai_1=ch.psi.pshell.modbus.AnalogInput|wago 3|||true +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||| +#spare_ai_5=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||| -#spare_ao_3=ch.psi.pshell.modbus.AnalogOutput|wago 3||| +smc_current=ch.psi.pshell.modbus.ProcessVariable|wago 3||| #cam=ch.psi.pshell.epics.AreaDetector|MX-SAMCAM||| #img_back=ch.psi.pshell.imaging.CameraSource|cam||-100| diff --git a/config/plugins.properties b/config/plugins.properties index 976e538..ded1585 100644 --- a/config/plugins.properties +++ b/config/plugins.properties @@ -5,6 +5,8 @@ NewJPanel.java=disabled Expert.java=disabled RobotPanel.java=enabled Wayne.java=disabled +SmartMagnetConfig.java=disabled +SmartMagnetPanel.java=enabled LaserUE.java=enabled PuckDetection.java=disabled TestZMQ.java=disabled diff --git a/devices/dewar_level.properties b/devices/dewar_level.properties index 098b613..92a5279 100644 --- a/devices/dewar_level.properties +++ b/devices/dewar_level.properties @@ -1,5 +1,6 @@ -#Mon Apr 23 09:19:43 CEST 2018 +#Tue Jun 19 16:41:20 CEST 2018 offset=-25.81632 precision=2 scale=0.003888 +sign_bit=0 unit=% diff --git a/devices/led_ctrl_1.properties b/devices/led_ctrl_1.properties index c6fe6fa..efe6ed5 100644 --- a/devices/led_ctrl_1.properties +++ b/devices/led_ctrl_1.properties @@ -1,8 +1,9 @@ -#Thu Jun 14 15:23:57 CEST 2018 -maxValue=1.0 +#Tue Jun 19 16:41:20 CEST 2018 +maxValue=0.4 minValue=0.0 offset=0.0 precision=2 resolution=NaN scale=3.0E-4 +sign_bit=0 unit=V diff --git a/devices/led_ctrl_2.properties b/devices/led_ctrl_2.properties index c6fe6fa..efe6ed5 100644 --- a/devices/led_ctrl_2.properties +++ b/devices/led_ctrl_2.properties @@ -1,8 +1,9 @@ -#Thu Jun 14 15:23:57 CEST 2018 -maxValue=1.0 +#Tue Jun 19 16:41:20 CEST 2018 +maxValue=0.4 minValue=0.0 offset=0.0 precision=2 resolution=NaN scale=3.0E-4 +sign_bit=0 unit=V diff --git a/devices/led_ctrl_3.properties b/devices/led_ctrl_3.properties index c6fe6fa..efe6ed5 100644 --- a/devices/led_ctrl_3.properties +++ b/devices/led_ctrl_3.properties @@ -1,8 +1,9 @@ -#Thu Jun 14 15:23:57 CEST 2018 -maxValue=1.0 +#Tue Jun 19 16:41:20 CEST 2018 +maxValue=0.4 minValue=0.0 offset=0.0 precision=2 resolution=NaN scale=3.0E-4 +sign_bit=0 unit=V diff --git a/devices/led_level.properties b/devices/led_level.properties index a187950..52dee03 100644 --- a/devices/led_level.properties +++ b/devices/led_level.properties @@ -1,8 +1,9 @@ -#Mon Apr 23 08:19:24 CEST 2018 +#Tue Jun 19 16:41:24 CEST 2018 maxValue=NaN minValue=NaN offset=0.0 precision=-1 resolution=NaN scale=1.0 +sign_bit=0 unit=null diff --git a/devices/phase_separator_level.properties b/devices/phase_separator_level.properties index 5e72524..92a5279 100644 --- a/devices/phase_separator_level.properties +++ b/devices/phase_separator_level.properties @@ -1,5 +1,6 @@ -#Thu Mar 01 15:21:07 CET 2018 +#Tue Jun 19 16:41:20 CEST 2018 offset=-25.81632 precision=2 scale=0.003888 +sign_bit=0 unit=% diff --git a/devices/rim_heater_temp.properties b/devices/rim_heater_temp.properties index 534b987..e1c3b95 100644 --- a/devices/rim_heater_temp.properties +++ b/devices/rim_heater_temp.properties @@ -1,5 +1,6 @@ -#Thu Mar 01 15:51:40 CET 2018 +#Tue Jun 19 16:41:20 CEST 2018 offset=-25.81632 precision=2 scale=0.003888 +sign_bit=0 unit=C diff --git a/devices/robot_j1.properties b/devices/robot_j1.properties index 0977d42..bc3a381 100644 --- a/devices/robot_j1.properties +++ b/devices/robot_j1.properties @@ -1,4 +1,4 @@ -#Tue Nov 28 17:23:41 CET 2017 +#Tue Jun 19 16:41:28 CEST 2018 maxValue=180.0 minValue=-180.0 offset=0.0 @@ -6,4 +6,5 @@ precision=2 resolution=0.1 rotation=false scale=1.0 +sign_bit=0 unit=deg diff --git a/devices/robot_j2.properties b/devices/robot_j2.properties index 00e1ce2..6a892bc 100644 --- a/devices/robot_j2.properties +++ b/devices/robot_j2.properties @@ -1,4 +1,4 @@ -#Tue Nov 28 17:23:45 CET 2017 +#Tue Jun 19 16:41:28 CEST 2018 maxValue=127.5 minValue=-127.5 offset=0.0 @@ -6,4 +6,5 @@ precision=2 resolution=0.1 rotation=false scale=1.0 +sign_bit=0 unit=deg diff --git a/devices/robot_j3.properties b/devices/robot_j3.properties index 9ea7576..07bff75 100644 --- a/devices/robot_j3.properties +++ b/devices/robot_j3.properties @@ -1,4 +1,4 @@ -#Tue Nov 28 17:23:40 CET 2017 +#Tue Jun 19 16:41:28 CEST 2018 maxValue=152.5 minValue=-152.5 offset=0.0 @@ -6,4 +6,5 @@ precision=2 resolution=0.1 rotation=false scale=1.0 +sign_bit=0 unit=deg diff --git a/devices/robot_j4.properties b/devices/robot_j4.properties index 0354887..41d8586 100644 --- a/devices/robot_j4.properties +++ b/devices/robot_j4.properties @@ -1,4 +1,4 @@ -#Tue Nov 28 17:23:44 CET 2017 +#Tue Jun 19 16:41:28 CEST 2018 maxValue=270.0 minValue=-270.0 offset=0.0 @@ -6,4 +6,5 @@ precision=2 resolution=0.1 rotation=false scale=1.0 +sign_bit=0 unit=deg diff --git a/devices/robot_j5.properties b/devices/robot_j5.properties index 4bb81fd..dab429f 100644 --- a/devices/robot_j5.properties +++ b/devices/robot_j5.properties @@ -1,4 +1,4 @@ -#Tue Nov 28 17:23:42 CET 2017 +#Tue Jun 19 16:41:28 CEST 2018 maxValue=132.5 minValue=-122.5 offset=0.0 @@ -6,4 +6,5 @@ precision=2 resolution=0.1 rotation=false scale=1.0 +sign_bit=0 unit=deg diff --git a/devices/robot_j6.properties b/devices/robot_j6.properties index 54507e0..41d8586 100644 --- a/devices/robot_j6.properties +++ b/devices/robot_j6.properties @@ -1,4 +1,4 @@ -#Tue Nov 28 17:23:43 CET 2017 +#Tue Jun 19 16:41:28 CEST 2018 maxValue=270.0 minValue=-270.0 offset=0.0 @@ -6,4 +6,5 @@ precision=2 resolution=0.1 rotation=false scale=1.0 +sign_bit=0 unit=deg diff --git a/devices/robot_rx.properties b/devices/robot_rx.properties index 69e8d2c..df63f03 100644 --- a/devices/robot_rx.properties +++ b/devices/robot_rx.properties @@ -1,4 +1,4 @@ -#Thu Nov 23 17:23:52 CET 2017 +#Tue Jun 19 16:41:28 CEST 2018 maxValue=180.0 minValue=-180.0 offset=0.0 @@ -6,4 +6,5 @@ precision=2 resolution=0.05 rotation=true scale=1.0 +sign_bit=0 unit=deg diff --git a/devices/robot_ry.properties b/devices/robot_ry.properties index 51daa4a..a789ebf 100644 --- a/devices/robot_ry.properties +++ b/devices/robot_ry.properties @@ -1,4 +1,4 @@ -#Thu Nov 23 17:23:32 CET 2017 +#Tue Jun 19 16:41:28 CEST 2018 maxValue=180.0 minValue=-180.0 offset=0.0 @@ -6,4 +6,5 @@ precision=-2 resolution=0.05 rotation=true scale=1.0 +sign_bit=0 unit=deg diff --git a/devices/robot_rz.properties b/devices/robot_rz.properties index 11604f5..2b88035 100644 --- a/devices/robot_rz.properties +++ b/devices/robot_rz.properties @@ -1,4 +1,4 @@ -#Tue Nov 28 16:56:22 CET 2017 +#Tue Jun 19 16:41:28 CEST 2018 maxValue=360.0 minValue=-360.0 offset=0.0 @@ -6,4 +6,5 @@ precision=2 resolution=0.1 rotation=true scale=1.0 +sign_bit=0 unit=deg diff --git a/devices/robot_x.properties b/devices/robot_x.properties index 4dbffac..5cdadcc 100644 --- a/devices/robot_x.properties +++ b/devices/robot_x.properties @@ -1,4 +1,4 @@ -#Tue Sep 12 15:07:33 CEST 2017 +#Tue Jun 19 16:41:28 CEST 2018 maxValue=1000.0 minValue=-1000.0 offset=0.0 @@ -6,4 +6,5 @@ precision=2 resolution=0.05 rotation=false scale=1.0 +sign_bit=0 unit=mm diff --git a/devices/robot_y.properties b/devices/robot_y.properties index 4bc4e79..eb8022e 100644 --- a/devices/robot_y.properties +++ b/devices/robot_y.properties @@ -1,4 +1,4 @@ -#Tue Sep 12 15:07:33 CEST 2017 +#Tue Jun 19 16:41:28 CEST 2018 maxValue=1000.0 minValue=-1000.0 offset=0.0 @@ -6,4 +6,5 @@ precision=2 resolution=0.05 rotation=false scale=1.0 +sign_bit=0 unit=null diff --git a/devices/robot_z.properties b/devices/robot_z.properties index a3126c5..eb8022e 100644 --- a/devices/robot_z.properties +++ b/devices/robot_z.properties @@ -1,4 +1,4 @@ -#Tue Sep 12 15:07:32 CEST 2017 +#Tue Jun 19 16:41:28 CEST 2018 maxValue=1000.0 minValue=-1000.0 offset=0.0 @@ -6,4 +6,5 @@ precision=2 resolution=0.05 rotation=false scale=1.0 +sign_bit=0 unit=null diff --git a/devices/smart_magnet.properties b/devices/smart_magnet.properties new file mode 100644 index 0000000..a37208e --- /dev/null +++ b/devices/smart_magnet.properties @@ -0,0 +1,6 @@ +#Fri Jun 22 11:07:01 CEST 2018 +holdingCurrent=10.0 +mountCurrent=35.0 +remanenceCurrent=-10.0 +restingCurrent=5.0 +unmountCurrent=2.5 diff --git a/devices/smc_current.properties b/devices/smc_current.properties new file mode 100644 index 0000000..aa71f58 --- /dev/null +++ b/devices/smc_current.properties @@ -0,0 +1,9 @@ +#Tue Jun 19 16:41:20 CEST 2018 +maxValue=50.0 +minValue=-50.0 +offset=0.0 +precision=2 +resolution=NaN +scale=0.003 +sign_bit=0 +unit=mA diff --git a/devices/smc_current_rb.properties b/devices/smc_current_rb.properties new file mode 100644 index 0000000..7709ada --- /dev/null +++ b/devices/smc_current_rb.properties @@ -0,0 +1,6 @@ +#Tue Jun 19 16:45:06 CEST 2018 +offset=0.0 +precision=2 +scale=0.003 +sign_bit=15 +unit=mA diff --git a/plugins/SmartMagnetConfig.java b/plugins/SmartMagnetConfig.java new file mode 100644 index 0000000..2c6213c --- /dev/null +++ b/plugins/SmartMagnetConfig.java @@ -0,0 +1,14 @@ + +import ch.psi.pshell.device.DeviceConfig; + +/** + * + */ +public class SmartMagnetConfig extends DeviceConfig{ + public double holdingCurrent; + public double restingCurrent; + public double mountCurrent; + public double unmountCurrent; + public double remanenceCurrent; + +} diff --git a/plugins/SmartMagnetPanel.form b/plugins/SmartMagnetPanel.form new file mode 100644 index 0000000..1e84613 --- /dev/null +++ b/plugins/SmartMagnetPanel.form @@ -0,0 +1,169 @@ + + +
diff --git a/plugins/SmartMagnetPanel.java b/plugins/SmartMagnetPanel.java new file mode 100644 index 0000000..98f5bff --- /dev/null +++ b/plugins/SmartMagnetPanel.java @@ -0,0 +1,185 @@ + +import ch.psi.pshell.device.Device; +import ch.psi.pshell.ui.App; +import ch.psi.pshell.swing.DevicePanel; +import ch.psi.pshell.core.Context; +import ch.psi.utils.State; +import java.awt.Color; +import java.lang.reflect.Method; +import java.util.Map; + +/** + * + */ +public class SmartMagnetPanel extends DevicePanel { + + /** + * Creates new form RobotPanel + */ + public SmartMagnetPanel() { + initComponents(); + } + + @Override + public void setDevice(Device device) { + super.setDevice(device); + if (device == null) { + + } + panelState.setDevice(device); + } + + @Override + protected void onDeviceStateChanged(State state, State former) { + switch(state){ + case Ready: + ledStatus.setColor(Color.GREEN); + ledMounted.setColor(Color.BLACK); + break; + case Busy: + ledStatus.setColor(Color.GREEN); + ledMounted.setColor(Color.GREEN); + break; + case Fault: + ledStatus.setColor(Color.RED); + ledMounted.setColor(Color.RED); + break; + default: + ledStatus.setColor(Color.BLACK); + ledMounted.setColor(Color.BLACK); + break; + } + } + + @Override + protected void onDeviceCacheChanged(Object value, Object former, long timestamp, boolean valueChange) { + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + //