This commit is contained in:
gac-S_Changer
2018-06-13 17:42:33 +02:00
parent 14398f49c1
commit 43b46a171f
22 changed files with 707 additions and 109 deletions

View File

@@ -1,6 +1,6 @@
#Mon Mar 19 11:35:49 CET 2018
#Wed Jun 13 10:31:31 CEST 2018
autoSaveScanData=true
createSessionFiles=false
createSessionFiles=true
dataLayout=default
dataPath={data}/{year}_{month}/{date}/{date}_{time}_{name}
dataProvider=h5

View File

@@ -1,6 +1,6 @@
img=ch.psi.pshell.prosilica.Prosilica|25001 "PacketSize=1522;PixelFormat=Mono8;BinningX=1;BinningY=1;RegionX=300;RegionY=200;Width=1000;Height=1000"|||false
microscan=ch.psi.pshell.serial.TcpDevice|129.129.126.200:2001|||
microscan_cmd=ch.psi.pshell.serial.TcpDevice|129.129.126.200:2003|||
microscan=ch.psi.pshell.serial.TcpDevice|129.129.100.200:2001|||
microscan_cmd=ch.psi.pshell.serial.TcpDevice|129.129.100.200:2003|||
ue=LaserUE|COM4|||false
#robot=RobotTcp|127.0.0.1:1000|||
#onewire=ch.psi.pshell.serial.TcpDevice|129.129.126.83:5000|||

View File

@@ -1,5 +1,6 @@
MXSC-1.10.0.jar=enabled
NewJPanel.java=disabled
Expert.java=disabled
MXSC-1.9.0.jar=enabled
RobotPanel.java=enabled
Wayne.java=disabled
LaserUE.java=enabled

View File

@@ -1,5 +1,5 @@
#Fri May 04 16:52:30 CEST 2018
maxValue=0.4
#Wed Jun 13 09:47:55 CEST 2018
maxValue=1.2
minValue=0.0
offset=0.0
precision=2

View File

@@ -1,5 +1,5 @@
#Fri May 04 16:52:30 CEST 2018
maxValue=0.4
#Wed Jun 13 09:47:55 CEST 2018
maxValue=1.2
minValue=0.0
offset=0.0
precision=2

View File

@@ -1,5 +1,5 @@
#Fri May 04 16:52:30 CEST 2018
maxValue=0.4
#Wed Jun 13 09:47:55 CEST 2018
maxValue=1.2
minValue=0.0
offset=0.0
precision=2

View File

@@ -18,17 +18,16 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Component id="jPanel2" alignment="1" min="-2" max="-2" attributes="0"/>
<Component id="panelSafety" alignment="1" min="-2" max="-2" attributes="0"/>
<Group type="103" alignment="1" groupAlignment="0" max="-2" attributes="0">
<Component id="jPanel3" alignment="1" max="32767" attributes="0"/>
<Component id="panelRobot" alignment="1" max="32767" attributes="0"/>
</Group>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="panelRobot1" linkSize="9" alignment="2" max="-2" attributes="0"/>
<Component id="panelRobot" linkSize="9" alignment="2" max="-2" attributes="0"/>
<Component id="jPanel3" linkSize="9" alignment="2" max="-2" attributes="0"/>
<Component id="jPanel2" linkSize="9" alignment="2" max="-2" attributes="0"/>
<Component id="panelSafety" linkSize="9" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="panelCommands" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="32" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -36,8 +35,8 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="panelCommands" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="panelCommands" min="-2" max="-2" attributes="0"/>
<Group type="102" attributes="0">
<Component id="panelSafety" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
@@ -46,9 +45,11 @@
<Component id="jPanel3" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="panelRobot" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="panelRobot1" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace max="32767" attributes="0"/>
<EmptySpace pref="29" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -67,12 +68,11 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace pref="78" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="buttonEnable" linkSize="4" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="buttonDisable" linkSize="4" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="79" max="32767" attributes="0"/>
<EmptySpace pref="32" max="32767" attributes="0"/>
<Component id="buttonEnable" linkSize="4" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="27" max="-2" attributes="0"/>
<Component id="buttonDisable" linkSize="4" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="32" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -80,9 +80,10 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="buttonEnable" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="buttonDisable" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="buttonEnable" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="buttonDisable" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
@@ -227,20 +228,43 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" max="-2" attributes="0">
<Component id="buttonHomingHexiposi" max="32767" attributes="0"/>
<Component id="buttonGetGonio" alignment="1" max="32767" attributes="0"/>
<Component id="buttonPutGonio" alignment="1" max="32767" attributes="0"/>
<Component id="buttonMount" alignment="1" max="32767" attributes="0"/>
<Component id="buttonUnmount" alignment="1" max="32767" attributes="0"/>
<Component id="buttonGetDewar" alignment="1" max="32767" attributes="0"/>
<Component id="buttonPutDewar" alignment="1" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="buttonMoveHeater" linkSize="7" max="32767" attributes="0"/>
<Component id="buttonMoveGonio" linkSize="7" max="32767" attributes="0"/>
<Component id="buttonMovePark" linkSize="7" alignment="1" max="32767" attributes="0"/>
<Component id="buttonGetGonio" linkSize="7" alignment="1" max="32767" attributes="0"/>
<Component id="buttonPutGonio" linkSize="7" alignment="1" max="32767" attributes="0"/>
<Component id="buttonMount" linkSize="7" alignment="1" max="32767" attributes="0"/>
<Component id="buttonUnmount" linkSize="7" alignment="1" max="32767" attributes="0"/>
<Component id="buttonGetDewar" linkSize="7" alignment="1" max="32767" attributes="0"/>
<Component id="buttonPutDewar" linkSize="7" alignment="1" max="32767" attributes="0"/>
<Component id="buttonDry" max="32767" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="jPanel5" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<EmptySpace min="-2" pref="30" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="buttonMoveScanner" linkSize="7" max="32767" attributes="0"/>
<Component id="buttonMoveHome" linkSize="7" max="32767" attributes="0"/>
<Component id="buttonMoveDewar" linkSize="7" max="32767" attributes="0"/>
<Component id="jPanel5" max="32767" attributes="0"/>
</Group>
<Group type="103" alignment="0" groupAlignment="1" attributes="0">
<Group type="102" attributes="0">
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="spinnerDrySpeed" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="spinnerDryTime" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<Component id="buttonHomingHexiposi" linkSize="7" max="32767" attributes="0"/>
</Group>
<EmptySpace pref="30" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -257,16 +281,43 @@
<Component id="buttonGetDewar" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="buttonPutDewar" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="buttonGetGonio" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="buttonPutGonio" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="jPanel5" max="32767" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="buttonHomingHexiposi" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="buttonGetGonio" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="buttonHomingHexiposi" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="buttonPutGonio" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="buttonMovePark" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="buttonMoveHome" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="buttonMoveGonio" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="buttonMoveDewar" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="buttonMoveHeater" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="buttonMoveScanner" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="buttonDry" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerDryTime" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="spinnerDrySpeed" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -340,7 +391,7 @@
<Component id="spinnerPuck" linkSize="2" min="-2" max="-2" attributes="0"/>
<Component id="spinnerSegment" linkSize="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -428,6 +479,14 @@
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JButton" name="buttonMovePark">
<Properties>
<Property name="text" type="java.lang.String" value="Move Park"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonMoveParkActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="buttonHomingHexiposi">
<Properties>
<Property name="text" type="java.lang.String" value="Homing Hexiposi"/>
@@ -436,6 +495,78 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonHomingHexiposiActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="buttonMoveHome">
<Properties>
<Property name="text" type="java.lang.String" value="Move Home"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonMoveHomeActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="buttonMoveGonio">
<Properties>
<Property name="text" type="java.lang.String" value="Move Gonio"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonMoveGonioActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="buttonMoveDewar">
<Properties>
<Property name="text" type="java.lang.String" value="Move Dewar"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonMoveDewarActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="buttonMoveScanner">
<Properties>
<Property name="text" type="java.lang.String" value="Move Scanner"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonMoveScannerActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="buttonMoveHeater">
<Properties>
<Property name="text" type="java.lang.String" value="Move Heater"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonMoveHeaterActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="buttonDry">
<Properties>
<Property name="text" type="java.lang.String" value="Dry"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonDryActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JSpinner" name="spinnerDryTime">
<Properties>
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
<SpinnerModel initial="10.0" maximum="30.0" minimum="1.0" numberType="java.lang.Double" stepSize="1.0" type="number"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel6">
<Properties>
<Property name="text" type="java.lang.String" value="Heat time(s):"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel7">
<Properties>
<Property name="text" type="java.lang.String" value="Speed(%):"/>
</Properties>
</Component>
<Component class="javax.swing.JSpinner" name="spinnerDrySpeed">
<Properties>
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
<SpinnerModel initial="1.0" maximum="10.0" minimum="0.1" numberType="java.lang.Double" stepSize="1.0" type="number"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanel3">
@@ -453,9 +584,9 @@
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="buttonPuckDetCheck" linkSize="6" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<EmptySpace pref="11" max="32767" attributes="0"/>
<Component id="buttonPuckDetStop" linkSize="6" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<EmptySpace pref="11" max="32767" attributes="0"/>
<Component id="buttonPuckDetStart" linkSize="6" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
@@ -502,5 +633,58 @@
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="panelRobot1">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="Dryer"/>
</Border>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace pref="24" max="32767" attributes="0"/>
<Component id="buttonHeater" linkSize="8" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="buttonStream" linkSize="8" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="25" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="buttonHeater" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="buttonStream" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JToggleButton" name="buttonHeater">
<Properties>
<Property name="text" type="java.lang.String" value="Heater"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonHeaterActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JToggleButton" name="buttonStream">
<Properties>
<Property name="text" type="java.lang.String" value="Air Stream"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonStreamActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Form>

View File

@@ -114,11 +114,25 @@ public class Expert extends Panel {
jLabel2 = new javax.swing.JLabel();
spinnerSegment = new javax.swing.JSpinner();
jLabel3 = new javax.swing.JLabel();
buttonMovePark = new javax.swing.JButton();
buttonHomingHexiposi = new javax.swing.JButton();
buttonMoveHome = new javax.swing.JButton();
buttonMoveGonio = new javax.swing.JButton();
buttonMoveDewar = new javax.swing.JButton();
buttonMoveScanner = new javax.swing.JButton();
buttonMoveHeater = new javax.swing.JButton();
buttonDry = new javax.swing.JButton();
spinnerDryTime = new javax.swing.JSpinner();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
spinnerDrySpeed = new javax.swing.JSpinner();
jPanel3 = new javax.swing.JPanel();
buttonPuckDetCheck = new javax.swing.JButton();
buttonPuckDetStop = new javax.swing.JButton();
buttonPuckDetStart = new javax.swing.JButton();
panelRobot1 = new javax.swing.JPanel();
buttonHeater = new javax.swing.JToggleButton();
buttonStream = new javax.swing.JToggleButton();
panelRobot.setBorder(javax.swing.BorderFactory.createTitledBorder("Robot"));
@@ -141,11 +155,11 @@ public class Expert extends Panel {
panelRobotLayout.setHorizontalGroup(
panelRobotLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelRobotLayout.createSequentialGroup()
.addContainerGap(78, Short.MAX_VALUE)
.addGroup(panelRobotLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(buttonEnable)
.addComponent(buttonDisable))
.addContainerGap(79, Short.MAX_VALUE))
.addContainerGap(32, Short.MAX_VALUE)
.addComponent(buttonEnable)
.addGap(27, 27, 27)
.addComponent(buttonDisable)
.addContainerGap(32, Short.MAX_VALUE))
);
panelRobotLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonDisable, buttonEnable});
@@ -154,9 +168,9 @@ public class Expert extends Panel {
panelRobotLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelRobotLayout.createSequentialGroup()
.addContainerGap()
.addComponent(buttonEnable)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(buttonDisable)
.addGroup(panelRobotLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonEnable)
.addComponent(buttonDisable))
.addContainerGap())
);
@@ -312,7 +326,7 @@ public class Expert extends Panel {
.addComponent(spinnerSample, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(spinnerPuck, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(spinnerSegment, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel5Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel1, jLabel2, jLabel3});
@@ -341,6 +355,13 @@ public class Expert extends Panel {
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
buttonMovePark.setText("Move Park");
buttonMovePark.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonMoveParkActionPerformed(evt);
}
});
buttonHomingHexiposi.setText("Homing Hexiposi");
buttonHomingHexiposi.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
@@ -348,24 +369,95 @@ public class Expert extends Panel {
}
});
buttonMoveHome.setText("Move Home");
buttonMoveHome.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonMoveHomeActionPerformed(evt);
}
});
buttonMoveGonio.setText("Move Gonio");
buttonMoveGonio.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonMoveGonioActionPerformed(evt);
}
});
buttonMoveDewar.setText("Move Dewar");
buttonMoveDewar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonMoveDewarActionPerformed(evt);
}
});
buttonMoveScanner.setText("Move Scanner");
buttonMoveScanner.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonMoveScannerActionPerformed(evt);
}
});
buttonMoveHeater.setText("Move Heater");
buttonMoveHeater.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonMoveHeaterActionPerformed(evt);
}
});
buttonDry.setText("Dry");
buttonDry.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonDryActionPerformed(evt);
}
});
spinnerDryTime.setModel(new javax.swing.SpinnerNumberModel(10.0d, 1.0d, 30.0d, 1.0d));
jLabel6.setText("Heat time(s):");
jLabel7.setText("Speed(%):");
spinnerDrySpeed.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.1d, 10.0d, 1.0d));
javax.swing.GroupLayout panelCommandsLayout = new javax.swing.GroupLayout(panelCommands);
panelCommands.setLayout(panelCommandsLayout);
panelCommandsLayout.setHorizontalGroup(
panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelCommandsLayout.createSequentialGroup()
.addContainerGap()
.addGroup(panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(buttonHomingHexiposi, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonGetGonio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonPutGonio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonMount, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonUnmount, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonGetDewar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonPutDewar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
.addGroup(panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(buttonMoveHeater, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonMoveGonio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonMovePark, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonGetGonio, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonPutGonio, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonMount, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonUnmount, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonGetDewar, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonPutDewar, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonDry, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(30, 30, 30)
.addGroup(panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(buttonMoveScanner, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonMoveHome, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonMoveDewar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(panelCommandsLayout.createSequentialGroup()
.addComponent(jLabel7)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(spinnerDrySpeed, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelCommandsLayout.createSequentialGroup()
.addComponent(jLabel6)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(spinnerDryTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addComponent(buttonHomingHexiposi, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap(30, Short.MAX_VALUE))
);
panelCommandsLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonGetDewar, buttonGetGonio, buttonHomingHexiposi, buttonMount, buttonMoveDewar, buttonMoveGonio, buttonMoveHeater, buttonMoveHome, buttonMovePark, buttonMoveScanner, buttonPutDewar, buttonPutGonio, buttonUnmount});
panelCommandsLayout.setVerticalGroup(
panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelCommandsLayout.createSequentialGroup()
@@ -378,15 +470,36 @@ public class Expert extends Panel {
.addGap(18, 18, 18)
.addComponent(buttonGetDewar)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(buttonPutDewar)
.addGap(18, 18, 18)
.addComponent(buttonGetGonio)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(buttonPutGonio))
.addComponent(buttonPutDewar))
.addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)
.addComponent(buttonHomingHexiposi)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonGetGonio)
.addComponent(buttonHomingHexiposi))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(buttonPutGonio)
.addGap(18, 18, 18)
.addGroup(panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonMovePark)
.addComponent(buttonMoveHome))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonMoveGonio)
.addComponent(buttonMoveDewar))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonMoveHeater)
.addComponent(buttonMoveScanner))
.addGap(18, 18, 18)
.addGroup(panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonDry)
.addComponent(spinnerDryTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel6))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(spinnerDrySpeed, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel7))
.addContainerGap())
);
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Puck Detection"));
@@ -419,9 +532,9 @@ public class Expert extends Panel {
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addComponent(buttonPuckDetCheck)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)
.addComponent(buttonPuckDetStop)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)
.addComponent(buttonPuckDetStart)
.addContainerGap())
);
@@ -439,28 +552,71 @@ public class Expert extends Panel {
.addContainerGap())
);
panelRobot1.setBorder(javax.swing.BorderFactory.createTitledBorder("Dryer"));
buttonHeater.setText("Heater");
buttonHeater.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonHeaterActionPerformed(evt);
}
});
buttonStream.setText("Air Stream");
buttonStream.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonStreamActionPerformed(evt);
}
});
javax.swing.GroupLayout panelRobot1Layout = new javax.swing.GroupLayout(panelRobot1);
panelRobot1.setLayout(panelRobot1Layout);
panelRobot1Layout.setHorizontalGroup(
panelRobot1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelRobot1Layout.createSequentialGroup()
.addContainerGap(24, Short.MAX_VALUE)
.addComponent(buttonHeater)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(buttonStream)
.addContainerGap(25, Short.MAX_VALUE))
);
panelRobot1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonHeater, buttonStream});
panelRobot1Layout.setVerticalGroup(
panelRobot1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelRobot1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(panelRobot1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonHeater)
.addComponent(buttonStream))
.addContainerGap())
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(panelSafety, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(panelRobot, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(panelRobot1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(panelRobot, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(panelSafety, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(panelCommands, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(32, Short.MAX_VALUE))
.addContainerGap())
);
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jPanel2, jPanel3, panelRobot, panelRobot1, panelSafety});
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(panelCommands, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panelCommands, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createSequentialGroup()
.addComponent(panelSafety, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
@@ -468,8 +624,10 @@ public class Expert extends Panel {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(panelRobot, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addComponent(panelRobot, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(panelRobot1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(29, Short.MAX_VALUE))
);
}// </editor-fold>//GEN-END:initComponents
@@ -556,14 +714,61 @@ public class Expert extends Panel {
execute("start_puck_detection()", true);
}//GEN-LAST:event_buttonPuckDetStartActionPerformed
private void buttonMoveParkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonMoveParkActionPerformed
execute("move_park()");
}//GEN-LAST:event_buttonMoveParkActionPerformed
private void buttonMoveHomeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonMoveHomeActionPerformed
execute("move_home()");
}//GEN-LAST:event_buttonMoveHomeActionPerformed
private void buttonMoveGonioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonMoveGonioActionPerformed
execute("move_gonio()");
}//GEN-LAST:event_buttonMoveGonioActionPerformed
private void buttonMoveDewarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonMoveDewarActionPerformed
execute("move_dewar()");
}//GEN-LAST:event_buttonMoveDewarActionPerformed
private void buttonMoveScannerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonMoveScannerActionPerformed
execute("move_scanner()");
}//GEN-LAST:event_buttonMoveScannerActionPerformed
private void buttonMoveHeaterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonMoveHeaterActionPerformed
execute("move_heater()");
}//GEN-LAST:event_buttonMoveHeaterActionPerformed
private void buttonDryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonDryActionPerformed
double dryTime = (Double) spinnerDryTime.getValue();
double streamTime = (Double) spinnerDrySpeed.getValue();
execute("dry(" + dryTime + ", " + streamTime + ")");
}//GEN-LAST:event_buttonDryActionPerformed
private void buttonHeaterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonHeaterActionPerformed
execute("set_heater(" + (buttonHeater.isSelected() ? "True": "False") + ")", true);
}//GEN-LAST:event_buttonHeaterActionPerformed
private void buttonStreamActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonStreamActionPerformed
execute("set_air_stream(" + (buttonStream.isSelected()? "True": "False")+ ")", true);
}//GEN-LAST:event_buttonStreamActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton buttonDisable;
private javax.swing.JButton buttonDry;
private javax.swing.JButton buttonEnable;
private javax.swing.JButton buttonEnableAll;
private javax.swing.JButton buttonGetDewar;
private javax.swing.JButton buttonGetGonio;
private javax.swing.JToggleButton buttonHeater;
private javax.swing.JButton buttonHomingHexiposi;
private javax.swing.JButton buttonMount;
private javax.swing.JButton buttonMoveDewar;
private javax.swing.JButton buttonMoveGonio;
private javax.swing.JButton buttonMoveHeater;
private javax.swing.JButton buttonMoveHome;
private javax.swing.JButton buttonMovePark;
private javax.swing.JButton buttonMoveScanner;
private javax.swing.JButton buttonPositionsHexiposi;
private javax.swing.JButton buttonPuckDetCheck;
private javax.swing.JButton buttonPuckDetStart;
@@ -572,18 +777,24 @@ public class Expert extends Panel {
private javax.swing.JButton buttonPutGonio;
private javax.swing.JButton buttonReleaseLocal;
private javax.swing.JButton buttonReleasePsys;
private javax.swing.JToggleButton buttonStream;
private javax.swing.JButton buttonUnmount;
private javax.swing.JCheckBox checkForce;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JPanel jPanel5;
private javax.swing.JPanel panelCommands;
private javax.swing.JPanel panelRobot;
private javax.swing.JPanel panelRobot1;
private javax.swing.JPanel panelSafety;
private javax.swing.JSpinner spinnerDrySpeed;
private javax.swing.JSpinner spinnerDryTime;
private javax.swing.JSpinner spinnerPuck;
private javax.swing.JSpinner spinnerSample;
private javax.swing.JSpinner spinnerSegment;

View File

@@ -13,6 +13,7 @@ class Hexiposi(DiscretePositionerBase):
self.moved = True
self.homing_state = State.Disabled
self.rback = self.UNKNOWN_POSITION
self.timeout = 3.0
def doInitialize(self):
super(Hexiposi, self).doInitialize()
@@ -24,7 +25,7 @@ class Hexiposi(DiscretePositionerBase):
return json.loads(response.text)
def get_status(self):
self.status = self.get_response(requests.get(url=self.url+"get"))
self.status = self.get_response(requests.get(url=self.url+"get", timeout=self.timeout))
self.estop = self.status["estop"]
self.homed = self.status["homed"]
self.error = self.status["errorCode"]
@@ -48,10 +49,10 @@ class Hexiposi(DiscretePositionerBase):
return self.status
def move_pos(self, pos):
return self.get_response(requests.get(url=self.url+"set?pos=" + str(pos)))
return self.get_response(requests.get(url=self.url+"set?pos=" + str(pos), timeout=self.timeout))
def move_home(self):
ret = self.get_response(requests.get(url=self.url+"set?home=1"))
ret = self.get_response(requests.get(url=self.url+"set?home=1", timeout=self.timeout))
try:
self.waitState(self.homing_state,1200)
except:
@@ -59,10 +60,10 @@ class Hexiposi(DiscretePositionerBase):
return ret
def stop_move(self):
return self.get_response(requests.get(url=self.url+"set?stop=1"))
return self.get_response(requests.get(url=self.url+"set?stop=1", timeout=self.timeout))
def set_offset(self, offset):
return self.get_response(requests.get(url=self.url+"setOffset?offset="+str(offset)))
return self.get_response(requests.get(url=self.url+"setOffset?offset="+str(offset), timeout=self.timeout))
def doUpdate(self):
self.get_status()

View File

@@ -24,7 +24,7 @@ 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", "robotRecover", "moveDewar", "movePark", "moveGonio","moveHeater", "moveScanner"])
self.set_known_points(["pHome", "pPark", "pDewarHome", "pGonioHome", "pDewarWait", "pGonioGet", "pScanHome", "pHeaterHome"])
self.set_known_points(["pHome", "pPark", "pDewarHome", "pGonioHome", "pDewarWait", "pGonioGet", "pScanHome", "pHeaterHome", "pHeater", "pHeaterBottom"])
self.setPolling(DEFAULT_ROBOT_POLLING)
def move_dewar(self):
@@ -65,15 +65,23 @@ class RobotSC(RobotTCP):
self.wait_task_finished(TASK_WAIT_ROBOT_POLLING)
self.assert_gonio()
def move_home(self):
self.start_task('moveHome')
self.wait_task_finished(TASK_WAIT_ROBOT_POLLING)
self.assert_home()
def move_park(self):
self.start_task('movePark')
self.wait_task_finished(TASK_WAIT_ROBOT_POLLING)
self.assert_park()
def move_heater(self):
self.start_task('moveHeater')
def move_heater(self, speed=-1, to_bottom=True):
self.start_task('moveHeater', speed, to_bottom)
self.wait_task_finished(TASK_WAIT_ROBOT_POLLING)
self.assert_heater()
if to_bottom:
self.assert_heater_bottom()
else:
self.assert_heater()
def robot_recover(self):
@@ -134,7 +142,13 @@ class RobotSC(RobotTCP):
return self.is_in_point("pDewarWait")
def is_heater(self):
return self.is_in_point("pHeaterHome")
return self.is_in_point("pHeater")
def is_heater_home(self):
return self.is_in_point("pHeaterHome")
def is_heater_bottom(self):
return self.is_in_point("pHeaterBottom")
def is_gonio(self):
return self.is_in_point("pGonioHome")
@@ -149,9 +163,15 @@ class RobotSC(RobotTCP):
def assert_home(self):
self.assert_in_point("pHome")
def assert_heater(self):
def assert_heater_home(self):
self.assert_in_point("pHeaterHome")
def assert_heater(self):
self.assert_in_point("pHeater")
def assert_heater_bottom(self):
self.assert_in_point("pHeaterBottom")
def assert_park(self):
self.assert_in_point("pPark")

View File

@@ -43,6 +43,7 @@ class RobotTCP(TcpDevice, Stoppable):
self.frame = FRAME_DEFAULT
self.polling_interval = 0.01
self.reset = True
self.default_tolerance = 10
self.task_start_retries = 3
self.exception_on_task_start_failure = True #Tasks may start and be finished when checked
@@ -454,8 +455,12 @@ class RobotTCP(TcpDevice, Stoppable):
#taskCreate "t1", 10, read(sMessage)
cmd = 'taskCreate "' + name + '", ' + str(priority) + ', ' + program + '('
for i in range(len(args)):
cmd += str(args[i]) + (',' if (i<(len(args)-1)) else '')
for i in range(len(args)):
val = args[i]
if type(val) == bool:
if val == True: val = "true"
elif val == False: val = "false"
cmd += str(val) + (',' if (i<(len(args)-1)) else '')
cmd+=')'
self.evaluate(cmd)
@@ -574,7 +579,7 @@ class RobotTCP(TcpDevice, Stoppable):
return self.distance_p("tcp_p", name)
def is_in_point(self, p, tolerance = None): #Tolerance in mm
tolerance = 10 if tolerance == None else tolerance
tolerance = self.default_tolerance if tolerance == None else tolerance
d = self.get_distance_to_pnt(p)
if d<0:
raise Exception ("Error calculating distance to " + p + " : " + str(d))
@@ -589,9 +594,9 @@ class RobotTCP(TcpDevice, Stoppable):
except:
ret[i] = None
return ret
def is_in_points(self, *pars, **kwargs): #Tolerance in mm
tolerance = 10 if (kwargs is None) or (not kwargs.has_key("tolerance")) or (kwargs["tolerance"] is None) else kwargs["tolerance"]
tolerance = self.default_tolerance if (kwargs is None) or (not kwargs.has_key("tolerance")) or (kwargs["tolerance"] is None) else kwargs["tolerance"]
ret = self.get_distance_to_pnts(*pars)
for i in range(len(ret)):
if ret[i]<0:

View File

@@ -35,6 +35,13 @@ run("motion/get_dewar")
run("motion/put_dewar")
run("motion/get_gonio")
run("motion/put_gonio")
run("motion/move_dewar")
run("motion/move_gonio")
run("motion/move_heater")
run("motion/move_home")
run("motion/move_park")
run("motion/move_scanner")
run("motion/dry")
run("motion/homing_hexiposi")
run("imgproc/Utils")
run("tools/Math")
@@ -66,6 +73,13 @@ def stop_puck_detection():
# Device initialization
###################################################################################################
try:
set_heater(False)
set_air_stream(False)
except:
print >> sys.stderr, traceback.format_exc()
try:
release_local_safety.write(False)
release_psys_safety.write(False)
@@ -109,7 +123,6 @@ except:
print >> sys.stderr, traceback.format_exc()
###################################################################################################
# Global variables
###################################################################################################

55
script/motion/dry.py Normal file
View File

@@ -0,0 +1,55 @@
def set_air_stream(state):
"""
"""
valve_1.write(state)
valve_2.write(not state)
def set_heater(state):
"""
"""
gripper_dryer.write(state)
def get_air_stream():
"""
"""
return valve_1.read()
def get_heater():
"""
"""
return gripper_dryer.read()
def dry(heat_time, speed):
"""
heat_time (float): in seconds
speed (float): % of nominal speed
"""
print "dry"
#Initial checks
robot.assert_no_task()
robot.reset_motion()
robot.state.assertReady()
robot.assert_cleared()
#robot.assert_in_known_point()
#Enabling
enable_motion()
try:
set_heater(True)
robot.move_heater(speed, False)
time.sleep(heat_time)
robot.move_heater(speed, True)
set_air_stream(True)
robot.move_heater(speed, False)
finally:
set_heater(False)
set_air_stream(False)
robot.move_dewar()

View File

@@ -2,7 +2,7 @@ def mount(segment, puck, sample, force=False):
"""
"""
print "mount: ", segment, puck, sample, force
start = time.time()
#Initial checks
assertValidAddress(segment, puck, sample)
robot.assert_no_task()

View File

@@ -0,0 +1,18 @@
def move_dewar():
"""
"""
print "move_dewar"
#Initial checks
robot.assert_no_task()
robot.reset_motion()
robot.state.assertReady()
robot.assert_cleared()
#robot.assert_in_known_point()
#Enabling
enable_motion()
if not robot.is_dewar():
robot.move_dewar()

View File

@@ -0,0 +1,18 @@
def move_gonio():
"""
"""
print "move_gonio"
#Initial checks
robot.assert_no_task()
robot.reset_motion()
robot.state.assertReady()
robot.assert_cleared()
#robot.assert_in_known_point()
#Enabling
enable_motion()
if not robot.is_gonio():
robot.move_gonio()

View File

@@ -0,0 +1,18 @@
def move_heater():
"""
"""
print "move_heater"
#Initial checks
robot.assert_no_task()
robot.reset_motion()
robot.state.assertReady()
robot.assert_cleared()
#robot.assert_in_known_point()
#Enabling
enable_motion()
if not robot.is_heater():
robot.move_heater()

View File

@@ -0,0 +1,18 @@
def move_home():
"""
"""
print "move_home"
#Initial checks
robot.assert_no_task()
robot.reset_motion()
robot.state.assertReady()
robot.assert_cleared()
#robot.assert_in_known_point()
#Enabling
enable_motion()
if not robot.is_home():
robot.move_home()

View File

@@ -0,0 +1,18 @@
def move_park():
"""
"""
print "move_park"
#Initial checks
robot.assert_no_task()
robot.reset_motion()
robot.state.assertReady()
robot.assert_cleared()
#robot.assert_in_known_point()
#Enabling
enable_motion()
if not robot.is_park():
robot.move_park()

View File

@@ -0,0 +1,18 @@
def move_scanner():
"""
"""
print "move_scanner"
#Initial checks
robot.assert_no_task()
robot.reset_motion()
robot.state.assertReady()
robot.assert_cleared()
#robot.assert_in_known_point()
#Enabling
enable_motion()
if not robot.is_scanner():
robot.move_scanner()