diff --git a/config/config.properties b/config/config.properties index 93defb5..074f303 100644 --- a/config/config.properties +++ b/config/config.properties @@ -1,4 +1,4 @@ -#Thu Feb 21 14:00:54 CET 2019 +#Mon Mar 18 11:39:59 CET 2019 autoSaveScanData=true commandExecutionEvents=false createSessionFiles=true @@ -10,6 +10,7 @@ dataScanPreserveTypes=false dataScanReleaseRecords=false dataServerPort=-1 depthDimension=0 +hideServerMessages=true hostName=null instanceName=TellSwissMX logDaysToLive=30 @@ -17,7 +18,7 @@ logLevel=Fine logLevelConsole=Off logPath={logs}/{date}_{time} notificationLevel=null -saveCommandStatistics=false +saveCommandStatistics=true scanStreamerPort=-1 serverEnabled=true serverPort=8080 diff --git a/config/settings.properties b/config/settings.properties index 7ed1d82..baaf92e 100644 --- a/config/settings.properties +++ b/config/settings.properties @@ -1,13 +1,12 @@ -#Thu Feb 28 15:18:27 CET 2019 +#Mon Mar 18 11:42:13 CET 2019 barcode_reader_scan_pucks=true beamline_status_enabled=false -dry_mount_counter=60 -dry_timestamp=1.543854393748E9 -force_dry_mount_count=0 +dry_mount_counter=2 +dry_timestamp=1.552645972582E9 +force_dry_mount_count=10 force_dry_timeout=0 imaging_enabled=false led_level=0.0 -mounted_sample_position=R46 pin_angle_offset=0.0 pin_offset=0.0 puck_types=true @@ -16,4 +15,4 @@ roi_w=1000 roi_x=337 roi_y=139 room_temperature_enabled=true -valve_control=true +valve_control=false diff --git a/config/setup-modbus.properties b/config/setup-modbus.properties index eb292c1..5fb7551 100644 --- a/config/setup-modbus.properties +++ b/config/setup-modbus.properties @@ -1,7 +1,8 @@ -#Wed Sep 14 15:16:45 CEST 2016 +#Wed Mar 06 11:11:04 CET 2019 configFile={config}/config.properties configFileDevices={config}/devices-modbus.properties configFilePlugins={config}/plugins.properties +configFileSettings={config}/settings.properties configFileTasks={config}/tasks.properties configPath={home}/config contextPath={outp}/context diff --git a/devices/A3.properties b/devices/A3.properties index 7bb91cd..8658d9e 100644 --- a/devices/A3.properties +++ b/devices/A3.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 -detection=Both +#Mon Mar 11 11:08:35 CET 2019 +detection=Mechanical disabled=false diff --git a/devices/A4.properties b/devices/A4.properties index 7bb91cd..b0fd9b5 100644 --- a/devices/A4.properties +++ b/devices/A4.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 -detection=Both +#Mon Mar 11 11:08:20 CET 2019 +detection=Mechanical disabled=false diff --git a/devices/A5.properties b/devices/A5.properties index 7bb91cd..e2fa568 100644 --- a/devices/A5.properties +++ b/devices/A5.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 -detection=Both +#Mon Mar 11 11:08:54 CET 2019 +detection=Mechanical disabled=false diff --git a/devices/B1.properties b/devices/B1.properties index 7bb91cd..01ef5b8 100644 --- a/devices/B1.properties +++ b/devices/B1.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 -detection=Both +#Mon Mar 11 11:09:03 CET 2019 +detection=Mechanical disabled=false diff --git a/devices/B2.properties b/devices/B2.properties index 7bb91cd..81de457 100644 --- a/devices/B2.properties +++ b/devices/B2.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 -detection=Both +#Mon Mar 11 11:09:06 CET 2019 +detection=Mechanical disabled=false diff --git a/devices/B3.properties b/devices/B3.properties index 7bb91cd..b340dec 100644 --- a/devices/B3.properties +++ b/devices/B3.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 -detection=Both +#Mon Mar 11 09:22:21 CET 2019 +detection=Inductive disabled=false diff --git a/devices/B4.properties b/devices/B4.properties index 7bb91cd..13413a6 100644 --- a/devices/B4.properties +++ b/devices/B4.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 -detection=Both +#Mon Mar 11 09:22:14 CET 2019 +detection=Mechanical disabled=false diff --git a/devices/B5.properties b/devices/B5.properties index 7bb91cd..ef6beab 100644 --- a/devices/B5.properties +++ b/devices/B5.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 -detection=Both +#Mon Mar 11 11:09:21 CET 2019 +detection=Mechanical disabled=false diff --git a/devices/C1.properties b/devices/C1.properties index 7bb91cd..fb0a3e2 100644 --- a/devices/C1.properties +++ b/devices/C1.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 -detection=Both +#Mon Mar 11 11:09:24 CET 2019 +detection=Mechanical disabled=false diff --git a/devices/C2.properties b/devices/C2.properties index 7bb91cd..8eb8284 100644 --- a/devices/C2.properties +++ b/devices/C2.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 -detection=Both +#Mon Mar 11 11:09:27 CET 2019 +detection=Mechanical disabled=false diff --git a/devices/C4.properties b/devices/C4.properties index 7bb91cd..67b9ce3 100644 --- a/devices/C4.properties +++ b/devices/C4.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 -detection=Both +#Mon Mar 11 11:09:35 CET 2019 +detection=Mechanical disabled=false diff --git a/devices/C5.properties b/devices/C5.properties index 7bb91cd..667bd2b 100644 --- a/devices/C5.properties +++ b/devices/C5.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 -detection=Both +#Mon Mar 11 11:09:40 CET 2019 +detection=Mechanical disabled=false diff --git a/devices/D1.properties b/devices/D1.properties index 7bb91cd..186ba3f 100644 --- a/devices/D1.properties +++ b/devices/D1.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 +#Mon Mar 11 11:06:32 CET 2019 detection=Both -disabled=false +disabled=true diff --git a/devices/D2.properties b/devices/D2.properties index 7bb91cd..f61b0b9 100644 --- a/devices/D2.properties +++ b/devices/D2.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 +#Mon Mar 11 11:06:39 CET 2019 detection=Both -disabled=false +disabled=true diff --git a/devices/D3.properties b/devices/D3.properties index 7bb91cd..7d6323d 100644 --- a/devices/D3.properties +++ b/devices/D3.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 +#Mon Mar 11 11:06:42 CET 2019 detection=Both -disabled=false +disabled=true diff --git a/devices/D4.properties b/devices/D4.properties index 7bb91cd..41d961c 100644 --- a/devices/D4.properties +++ b/devices/D4.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 +#Mon Mar 11 11:06:44 CET 2019 detection=Both -disabled=false +disabled=true diff --git a/devices/D5.properties b/devices/D5.properties index 7bb91cd..1eda1ac 100644 --- a/devices/D5.properties +++ b/devices/D5.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 +#Mon Mar 11 11:06:47 CET 2019 detection=Both -disabled=false +disabled=true diff --git a/devices/E1.properties b/devices/E1.properties index 7bb91cd..3357d4c 100644 --- a/devices/E1.properties +++ b/devices/E1.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 +#Mon Mar 11 11:06:49 CET 2019 detection=Both -disabled=false +disabled=true diff --git a/devices/E2.properties b/devices/E2.properties index 7bb91cd..9f9c780 100644 --- a/devices/E2.properties +++ b/devices/E2.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 +#Mon Mar 11 11:06:51 CET 2019 detection=Both -disabled=false +disabled=true diff --git a/devices/E3.properties b/devices/E3.properties index 7bb91cd..53c91c6 100644 --- a/devices/E3.properties +++ b/devices/E3.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 +#Mon Mar 11 11:06:54 CET 2019 detection=Both -disabled=false +disabled=true diff --git a/devices/E4.properties b/devices/E4.properties index 7bb91cd..08a5e90 100644 --- a/devices/E4.properties +++ b/devices/E4.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 +#Mon Mar 11 11:06:57 CET 2019 detection=Both -disabled=false +disabled=true diff --git a/devices/E5.properties b/devices/E5.properties index 7bb91cd..7f481b5 100644 --- a/devices/E5.properties +++ b/devices/E5.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 +#Mon Mar 11 11:07:02 CET 2019 detection=Both -disabled=false +disabled=true diff --git a/devices/F1.properties b/devices/F1.properties index 7bb91cd..59bf93e 100644 --- a/devices/F1.properties +++ b/devices/F1.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 +#Mon Mar 11 11:07:04 CET 2019 detection=Both -disabled=false +disabled=true diff --git a/devices/F2.properties b/devices/F2.properties index 7bb91cd..0b4fc91 100644 --- a/devices/F2.properties +++ b/devices/F2.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 +#Mon Mar 11 11:07:06 CET 2019 detection=Both -disabled=false +disabled=true diff --git a/devices/F3.properties b/devices/F3.properties index 7bb91cd..da79fa6 100644 --- a/devices/F3.properties +++ b/devices/F3.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 +#Mon Mar 11 11:07:08 CET 2019 detection=Both -disabled=false +disabled=true diff --git a/devices/F4.properties b/devices/F4.properties index 7bb91cd..0bc16c9 100644 --- a/devices/F4.properties +++ b/devices/F4.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 +#Mon Mar 11 11:07:10 CET 2019 detection=Both -disabled=false +disabled=true diff --git a/devices/F5.properties b/devices/F5.properties index 7bb91cd..b767b60 100644 --- a/devices/F5.properties +++ b/devices/F5.properties @@ -1,3 +1,3 @@ -#Thu Feb 14 10:34:24 CET 2019 +#Mon Mar 11 11:07:12 CET 2019 detection=Both -disabled=false +disabled=true diff --git a/devices/led_ctrl_1.properties b/devices/led_ctrl_1.properties index 8360687..4afcc83 100644 --- a/devices/led_ctrl_1.properties +++ b/devices/led_ctrl_1.properties @@ -1,5 +1,5 @@ -#Mon Dec 03 22:45:14 CET 2018 -maxValue=0.4 +#Mon Mar 18 11:42:13 CET 2019 +maxValue=1.0 minValue=0.0 offset=0.0 precision=2 diff --git a/devices/led_ctrl_2.properties b/devices/led_ctrl_2.properties index 8360687..4afcc83 100644 --- a/devices/led_ctrl_2.properties +++ b/devices/led_ctrl_2.properties @@ -1,5 +1,5 @@ -#Mon Dec 03 22:45:14 CET 2018 -maxValue=0.4 +#Mon Mar 18 11:42:13 CET 2019 +maxValue=1.0 minValue=0.0 offset=0.0 precision=2 diff --git a/devices/led_ctrl_3.properties b/devices/led_ctrl_3.properties index 8360687..4afcc83 100644 --- a/devices/led_ctrl_3.properties +++ b/devices/led_ctrl_3.properties @@ -1,5 +1,5 @@ -#Mon Dec 03 22:45:14 CET 2018 -maxValue=0.4 +#Mon Mar 18 11:42:13 CET 2019 +maxValue=1.0 minValue=0.0 offset=0.0 precision=2 diff --git a/devices/smart_magnet.properties b/devices/smart_magnet.properties index 0111e5f..bd3b5a1 100644 --- a/devices/smart_magnet.properties +++ b/devices/smart_magnet.properties @@ -1,6 +1,6 @@ -#Fri Feb 15 12:53:07 CET 2019 +#Thu Mar 14 16:45:07 CET 2019 holdingCurrent=40.0 -mountCurrent=20.0 +mountCurrent=40.0 remanenceCurrent=-10.0 restingCurrent=20.0 reverseCurrent=-10.0 diff --git a/plugins/Commands.java b/plugins/Commands.java index d08bca6..ff54e04 100644 --- a/plugins/Commands.java +++ b/plugins/Commands.java @@ -932,12 +932,12 @@ public class Commands extends Panel { private void buttonGetAuxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonGetAuxActionPerformed int sample = (Integer) spinnerSample.getValue(); - execute("get_aux('" + sample + ")"); + execute("get_aux('" + sample + "')"); }//GEN-LAST:event_buttonGetAuxActionPerformed private void buttonPutAuxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPutAuxActionPerformed int sample = (Integer) spinnerSample.getValue(); - execute("put_aux('" + sample + ")"); + execute("put_aux('" + sample + "')"); }//GEN-LAST:event_buttonPutAuxActionPerformed private void checkAuxiliaryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkAuxiliaryActionPerformed diff --git a/plugins/MXSC-1.10.0.jar b/plugins/MXSC-1.10.0.jar index d2d27c6..5097224 100644 Binary files a/plugins/MXSC-1.10.0.jar and b/plugins/MXSC-1.10.0.jar differ diff --git a/plugins/SmartMagnetPanel.form b/plugins/SmartMagnetPanel.form index 432e7bd..6433fba 100644 --- a/plugins/SmartMagnetPanel.form +++ b/plugins/SmartMagnetPanel.form @@ -55,22 +55,20 @@ + + + + + + + - - - - - - - - - - - - - - + + + + + @@ -82,9 +80,9 @@ - - + + @@ -92,9 +90,9 @@ - - - + + + @@ -115,21 +113,6 @@ - - - - - - - - - - - - - - - @@ -154,6 +137,15 @@ + + + + + + + + + diff --git a/plugins/SmartMagnetPanel.java b/plugins/SmartMagnetPanel.java index 589fb82..74647ff 100644 --- a/plugins/SmartMagnetPanel.java +++ b/plugins/SmartMagnetPanel.java @@ -41,26 +41,31 @@ public class SmartMagnetPanel extends DevicePanel { ledSupressed.setColor(Color.ORANGE); ledStatus.setColor(Color.GREEN); ledMounted.setColor(Color.RED); + textStatus.setText("Supressed"); break; case Ready: ledSupressed.setColor(Color.BLACK); ledStatus.setColor(Color.GREEN); ledMounted.setColor(Color.GREEN); + textStatus.setText("Not Mounted"); break; case Busy: ledSupressed.setColor(Color.BLACK); ledStatus.setColor(Color.GREEN); ledMounted.setColor(Color.ORANGE); + textStatus.setText("Mounted"); break; case Fault: ledSupressed.setColor(Color.RED); ledStatus.setColor(Color.RED); ledMounted.setColor(Color.RED); + textStatus.setText("Error"); break; default: ledSupressed.setColor(Color.BLACK); ledStatus.setColor(Color.BLACK); ledMounted.setColor(Color.BLACK); + textStatus.setText("Invalid"); break; } buttonSupressOn.setEnabled((state==State.Ready) || (state == State.Busy)); @@ -83,11 +88,11 @@ public class SmartMagnetPanel extends DevicePanel { jPanel1 = new javax.swing.JPanel(); ledStatus = new ch.psi.pshell.swing.Led(); jLabel1 = new javax.swing.JLabel(); - panelPowerCtr = new javax.swing.JPanel(); jLabel5 = new javax.swing.JLabel(); ledMounted = new ch.psi.pshell.swing.Led(); jLabel10 = new javax.swing.JLabel(); panelCurrentRb = new ch.psi.pshell.swing.DeviceValuePanel(); + textStatus = new javax.swing.JTextField(); panelState = new ch.psi.pshell.swing.DeviceStatePanel(); panelCurrent = new ch.psi.pshell.swing.ProcessVariablePanel(); jPanel2 = new javax.swing.JPanel(); @@ -105,17 +110,6 @@ public class SmartMagnetPanel extends DevicePanel { jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); jLabel1.setText("Status:"); - javax.swing.GroupLayout panelPowerCtrLayout = new javax.swing.GroupLayout(panelPowerCtr); - panelPowerCtr.setLayout(panelPowerCtrLayout); - panelPowerCtrLayout.setHorizontalGroup( - panelPowerCtrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 150, Short.MAX_VALUE) - ); - panelPowerCtrLayout.setVerticalGroup( - panelPowerCtrLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 23, Short.MAX_VALUE) - ); - jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); jLabel5.setText("Mounted:"); @@ -126,6 +120,10 @@ public class SmartMagnetPanel extends DevicePanel { panelCurrentRb.setDeviceName("smc_current_rb"); + textStatus.setHorizontalAlignment(javax.swing.JTextField.CENTER); + textStatus.setDisabledTextColor(new java.awt.Color(0, 0, 0)); + textStatus.setEnabled(false); + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( @@ -133,20 +131,18 @@ public class SmartMagnetPanel extends DevicePanel { .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(ledMounted, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel1Layout.createSequentialGroup() - .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ledStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(panelPowerCtr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(jPanel1Layout.createSequentialGroup() - .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(ledMounted, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(jPanel1Layout.createSequentialGroup() - .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(panelCurrentRb, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(18, 18, 18) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(panelCurrentRb, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(textStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( @@ -154,15 +150,15 @@ public class SmartMagnetPanel extends DevicePanel { .addGroup(jPanel1Layout.createSequentialGroup() .addGap(4, 4, 4) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) - .addComponent(jLabel1) .addComponent(ledStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(panelPowerCtr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jLabel1) + .addComponent(textStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent(jLabel5) .addComponent(ledMounted, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent(jLabel10) .addComponent(panelCurrentRb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) @@ -314,7 +310,7 @@ public class SmartMagnetPanel extends DevicePanel { private ch.psi.pshell.swing.Led ledSupressed; private ch.psi.pshell.swing.ProcessVariablePanel panelCurrent; private ch.psi.pshell.swing.DeviceValuePanel panelCurrentRb; - private javax.swing.JPanel panelPowerCtr; private ch.psi.pshell.swing.DeviceStatePanel panelState; + private javax.swing.JTextField textStatus; // End of variables declaration//GEN-END:variables } diff --git a/script/devices/RobotSC.py b/script/devices/RobotSC.py index 404b582..a47d4b2 100644 --- a/script/devices/RobotSC.py +++ b/script/devices/RobotSC.py @@ -27,23 +27,23 @@ joint_forces = False class RobotSC(RobotTCP): def __init__(self, name, server, timeout = 1000, retries = 1): RobotTCP.__init__(self, name, server, timeout, retries) - self.set_tasks(["getDewar", "putDewar", "putGonio", "getGonio", "recover", "moveDewar", "moveCold", "movePark", "moveGonio","moveHeater", "moveScanner","moveHome", "moveAux","moveRT"]) + self.set_tasks(["getDewar", "putDewar", "putGonio", "getGonio", "recover", "mvDewar", "mvCold", "mvPark", "mvGonio","mvHeater", "mvScanner","mvHome", "mvAux","mvRT","getAux","putAux"]) self.set_known_points(["pPark", "pGonio", "pDewar", "pGonioG", "pScan", "pHeater", "pHeat", "pHeatB","pHe", "pHome", "pCold", "pAux", "pRT"]) self.setPolling(DEFAULT_ROBOT_POLLING) #self.setSimulated() def move_dewar(self): - self.start_task('moveDewar') + self.start_task('mvDewar') self.wait_task_finished(TASK_WAIT_ROBOT_POLLING) self.assert_dewar() def move_cold(self): - self.start_task('moveCold') + self.start_task('mvCold') self.wait_task_finished(TASK_WAIT_ROBOT_POLLING) self.assert_cold() def move_home(self): - self.start_task('moveHome') + self.start_task('mvHome') self.wait_task_finished(TASK_WAIT_ROBOT_POLLING) self.assert_home() @@ -88,13 +88,13 @@ class RobotSC(RobotTCP): def get_aux(self, sample): self.assert_aux() - self.start_task('getAuxiliary', sample) + self.start_task('getAux', sample) self.wait_task_finished(TASK_WAIT_ROBOT_POLLING) self.assert_aux() def put_aux(self, sample): self.assert_aux() - self.start_task('putAuxiliary', sample) + self.start_task('putAux', sample) self.wait_task_finished(TASK_WAIT_ROBOT_POLLING) self.assert_aux() @@ -111,7 +111,7 @@ class RobotSC(RobotTCP): self.assert_rt() def move_scanner(self): - self.start_task('moveScanner') + self.start_task('mvScanner') self.wait_task_finished(TASK_WAIT_ROBOT_POLLING) self.assert_scanner() @@ -121,18 +121,18 @@ class RobotSC(RobotTCP): # self.assert_scan_stop() def move_gonio(self): - self.start_task('moveGonio') + self.start_task('mvGonio') self.wait_task_finished(TASK_WAIT_ROBOT_POLLING) self.assert_gonio() def move_park(self): - self.start_task('movePark') + self.start_task('mvPark') self.wait_task_finished(TASK_WAIT_ROBOT_POLLING) self.assert_park() def move_heater(self, speed=-1, to_bottom=True): - self.start_task('moveHeater', speed, to_bottom) + self.start_task('mvHeater', speed, to_bottom) self.wait_task_finished(TASK_WAIT_ROBOT_POLLING) if to_bottom: self.assert_heater_bottom() @@ -146,12 +146,12 @@ class RobotSC(RobotTCP): self.assert_home() def move_aux(self): - self.start_task('moveAux') + self.start_task('mvAux') self.wait_task_finished(TASK_WAIT_ROBOT_POLLING) self.assert_aux() def move_rt(self): - self.start_task('moveRT') + self.start_task('mvRT') self.wait_task_finished(TASK_WAIT_ROBOT_POLLING) self.assert_rt() diff --git a/script/motion/mount.py b/script/motion/mount.py index 0efad3e..d99cd3d 100644 --- a/script/motion/mount.py +++ b/script/motion/mount.py @@ -54,6 +54,7 @@ def mount(segment, puck, sample, force=False, read_dm=False, auto_unmount=False) smart_magnet.set_supress(False) time.sleep(0.2) #To better dectect sample + smart_magnet.apply_reverse() smart_magnet.apply_resting() time.sleep(0.5) if smart_magnet.check_mounted(idle_time=0.25, timeout = 1.0) == True: diff --git a/script/motion/tools.py b/script/motion/tools.py index bbc3d6b..f545c27 100644 --- a/script/motion/tools.py +++ b/script/motion/tools.py @@ -149,18 +149,19 @@ def assert_valid_address(segment, puck, sample): raise Exception ("Invalid address for RT gripper") if is_string(segment): segment = ord(segment.upper()) - ord('A') +1 - if segment<=0 or segment >6: - raise Exception ("Invalid segment") - if puck<=0 or puck >5: - raise Exception ("Invalid puck") - if sample<=0 or sample >16: - raise Exception ("Invalid sample") + if (segment<=0) or (segment >6): + raise Exception ("Invalid segment: " + str(segment)) + if (puck<=0) or (puck >5): + raise Exception ("Invalid puck: " +str( puck)) + if (sample<=0) or (sample >16): + raise Exception ("Invalid sample: " + str(sample)) if get_puck_dev(segment, puck).isDisabled(): raise Exception ("Puck is disabled") def assert_valid_sample(sample): - if sample<=0 or sample >16: - raise Exception ("Invalid sample") + sample = int(sample) + if (sample<=0) or (sample >16): + raise Exception ("Invalid sample: " + str(sample)) def get_puck_name(segment, puck): try: diff --git a/script/motion/unmount.py b/script/motion/unmount.py index 76eb2a7..a08fa6b 100644 --- a/script/motion/unmount.py +++ b/script/motion/unmount.py @@ -41,7 +41,8 @@ def unmount(segment = None, puck = None, sample = None, force=False, auto_unmoun if smart_magnet.get_supress() == True: smart_magnet.set_supress(False) time.sleep(0.2) - + + smart_magnet.apply_reverse() smart_magnet.apply_resting() if not force: