This commit is contained in:
+65
-11
@@ -71,11 +71,12 @@
|
||||
<Component id="jLabel2" linkSize="1" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="jLabel20" linkSize="1" alignment="1" min="-2" pref="86" max="-2" attributes="0"/>
|
||||
<Component id="jLabel21" linkSize="1" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel23" linkSize="1" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="spinnerBunch" linkSize="8" alignment="0" min="-2" pref="104" max="-2" attributes="0"/>
|
||||
<Component id="spinnerVel" linkSize="8" alignment="0" min="-2" pref="104" max="-2" attributes="0"/>
|
||||
<Component id="spinnerPoints" linkSize="8" alignment="0" min="-2" pref="104" max="-2" attributes="0"/>
|
||||
<Component id="spinnerStartX" linkSize="8" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="spinnerStartY" linkSize="8" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
@@ -111,7 +112,10 @@
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="98" pref="98" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="panelStatus" min="-2" pref="324" max="-2" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="panelStatus" min="-2" pref="324" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="comboBlm3" alignment="0" max="32767" attributes="0"/>
|
||||
@@ -147,7 +151,18 @@
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="buttonHoming" max="32767" attributes="0"/>
|
||||
<Component id="buttonScannerPanel" linkSize="3" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="buttonMotorPanel" linkSize="3" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="buttonCalibration" linkSize="3" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="labelVelX" linkSize="4" min="-2" pref="90" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel24" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="98" pref="98" max="-2" attributes="0"/>
|
||||
<Component id="labelVelY" linkSize="4" min="-2" pref="90" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
@@ -178,7 +193,7 @@
|
||||
</Group>
|
||||
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel9" linkSize="12" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerVel" linkSize="9" alignment="3" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
<Component id="spinnerPoints" linkSize="9" alignment="3" min="-2" pref="20" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
@@ -245,7 +260,7 @@
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="jLabel13" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="labelPosX" linkSize="5" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="buttonMotorPanel" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="buttonCalibration" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
@@ -253,6 +268,13 @@
|
||||
<Component id="labelPosY" linkSize="5" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="jLabel23" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="labelVelX" linkSize="5" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel24" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="labelVelY" linkSize="5" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="jLabel15" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="panelRepRate" linkSize="11" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
@@ -310,7 +332,7 @@
|
||||
<Component class="javax.swing.JLabel" name="jLabel8">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="11"/>
|
||||
<Property name="text" type="java.lang.String" value="Vel (µm/s):"/>
|
||||
<Property name="text" type="java.lang.String" value="Points:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonScan">
|
||||
@@ -420,10 +442,10 @@
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="comboBpm3">
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerVel">
|
||||
<Component class="javax.swing.JSpinner" name="spinnerPoints">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="200.0" maximum="10000.0" minimum="1.0" numberType="java.lang.Double" stepSize="1.0" type="number"/>
|
||||
<SpinnerModel initial="200" maximum="10000" minimum="1" numberType="java.lang.Integer" stepSize="1" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -517,12 +539,12 @@
|
||||
<Property name="text" type="java.lang.String" value="Pos mot (µm):"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonMotorPanel">
|
||||
<Component class="javax.swing.JButton" name="buttonCalibration">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Motor Panel"/>
|
||||
<Property name="text" type="java.lang.String" value="Calibration"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonMotorPanelActionPerformed"/>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonCalibrationActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="labelPosX">
|
||||
@@ -628,6 +650,38 @@
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel23">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="11"/>
|
||||
<Property name="text" type="java.lang.String" value="Vel x (µm/s):"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="labelVelX">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<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/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel24">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="11"/>
|
||||
<Property name="text" type="java.lang.String" value="Vel y (µm/s):"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="labelVelY">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
<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/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
|
||||
+79
-29
@@ -139,6 +139,14 @@ public class WireScan extends Panel {
|
||||
}
|
||||
onStateChange(getState(), getState());
|
||||
panelRepRate.getDevice().update();
|
||||
|
||||
double rr = (Double)panelRepRate.getDevice().take();
|
||||
int points = (Integer)spinnerPoints.getValue();
|
||||
double velocity_x = Math.abs((Double)spinnerEndX.getValue()-(Double)spinnerStartX.getValue())*rr/points;
|
||||
labelVelX.setText(String.format("%1.1f", velocity_x));
|
||||
double velocity_y = Math.abs((Double)spinnerEndY.getValue()-(Double)spinnerStartY.getValue())*rr/points;
|
||||
labelVelY.setText(String.format("%1.1f", velocity_y));
|
||||
|
||||
} catch (Exception ex){
|
||||
}
|
||||
}
|
||||
@@ -159,10 +167,10 @@ public class WireScan extends Panel {
|
||||
for (JComboBox cb : blmCombos){
|
||||
cb.setEnabled(validWireScan);
|
||||
}
|
||||
buttonMotorPanel.setEnabled(validWireScan);
|
||||
buttonCalibration.setEnabled(validWireScan);
|
||||
buttonScannerPanel.setEnabled(validWireScan);
|
||||
buttonHoming.setEnabled(validWireScan);
|
||||
spinnerVel.setEnabled(validWireScan && !isBackground());
|
||||
spinnerPoints.setEnabled(validWireScan && !isBackground());
|
||||
spinnerCycles.setEnabled(validWireScan && !isBackground());
|
||||
spinnerStartX.setEnabled(validWireScan && isX());
|
||||
spinnerEndX.setEnabled(spinnerStartX.isEnabled());
|
||||
@@ -351,7 +359,7 @@ public class WireScan extends Panel {
|
||||
panelPosition = new ch.psi.pshell.swing.DeviceValuePanel();
|
||||
comboBlm2 = new javax.swing.JComboBox();
|
||||
comboBpm3 = new javax.swing.JComboBox();
|
||||
spinnerVel = new javax.swing.JSpinner();
|
||||
spinnerPoints = new javax.swing.JSpinner();
|
||||
buttonRaw2 = new javax.swing.JButton();
|
||||
comboBlm3 = new javax.swing.JComboBox();
|
||||
comboWireScanner = new javax.swing.JComboBox();
|
||||
@@ -367,7 +375,7 @@ public class WireScan extends Panel {
|
||||
spinnerStartX = new javax.swing.JSpinner();
|
||||
jLabel13 = new javax.swing.JLabel();
|
||||
jLabel11 = new javax.swing.JLabel();
|
||||
buttonMotorPanel = new javax.swing.JButton();
|
||||
buttonCalibration = new javax.swing.JButton();
|
||||
labelPosX = new javax.swing.JLabel();
|
||||
spinnerBackground = new javax.swing.JSpinner();
|
||||
buttonHoming = new javax.swing.JButton();
|
||||
@@ -384,6 +392,10 @@ public class WireScan extends Panel {
|
||||
buttonScannerPanel = new javax.swing.JButton();
|
||||
jLabel21 = new javax.swing.JLabel();
|
||||
spinnerBunch = new javax.swing.JSpinner();
|
||||
jLabel23 = new javax.swing.JLabel();
|
||||
labelVelX = new javax.swing.JLabel();
|
||||
jLabel24 = new javax.swing.JLabel();
|
||||
labelVelY = new javax.swing.JLabel();
|
||||
|
||||
plot.setTitle("");
|
||||
|
||||
@@ -401,7 +413,7 @@ public class WireScan extends Panel {
|
||||
jLabel14.setText("Pos y (µm):");
|
||||
|
||||
jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
jLabel8.setText("Vel (µm/s):");
|
||||
jLabel8.setText("Points:");
|
||||
|
||||
buttonScan.setText("Scan");
|
||||
buttonScan.addActionListener(new java.awt.event.ActionListener() {
|
||||
@@ -471,7 +483,7 @@ public class WireScan extends Panel {
|
||||
}
|
||||
});
|
||||
|
||||
spinnerVel.setModel(new javax.swing.SpinnerNumberModel(200.0d, 1.0d, 10000.0d, 1.0d));
|
||||
spinnerPoints.setModel(new javax.swing.SpinnerNumberModel(200, 1, 10000, 1));
|
||||
|
||||
buttonRaw2.setText("Raw Signal");
|
||||
buttonRaw2.addActionListener(new java.awt.event.ActionListener() {
|
||||
@@ -524,10 +536,10 @@ public class WireScan extends Panel {
|
||||
jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
jLabel11.setText("Pos mot (µm):");
|
||||
|
||||
buttonMotorPanel.setText("Motor Panel");
|
||||
buttonMotorPanel.addActionListener(new java.awt.event.ActionListener() {
|
||||
buttonCalibration.setText("Calibration");
|
||||
buttonCalibration.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonMotorPanelActionPerformed(evt);
|
||||
buttonCalibrationActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -586,6 +598,18 @@ public class WireScan extends Panel {
|
||||
|
||||
spinnerBunch.setModel(new javax.swing.SpinnerNumberModel(1, 1, 2, 1));
|
||||
|
||||
jLabel23.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
jLabel23.setText("Vel x (µm/s):");
|
||||
|
||||
labelVelX.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
labelVelX.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
|
||||
|
||||
jLabel24.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
jLabel24.setText("Vel y (µm/s):");
|
||||
|
||||
labelVelY.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
labelVelY.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
|
||||
|
||||
javax.swing.GroupLayout panelLeftLayout = new javax.swing.GroupLayout(panelLeft);
|
||||
panelLeft.setLayout(panelLeftLayout);
|
||||
panelLeftLayout.setHorizontalGroup(
|
||||
@@ -611,11 +635,12 @@ public class WireScan extends Panel {
|
||||
.addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jLabel20, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel21, javax.swing.GroupLayout.Alignment.TRAILING))
|
||||
.addComponent(jLabel21, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel23, javax.swing.GroupLayout.Alignment.TRAILING))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(spinnerBunch, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(spinnerVel, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(spinnerPoints, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(spinnerStartX)
|
||||
.addComponent(spinnerStartY))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
@@ -645,7 +670,9 @@ public class WireScan extends Panel {
|
||||
.addGroup(panelLeftLayout.createSequentialGroup()
|
||||
.addGap(98, 98, 98)
|
||||
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(panelStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(panelLeftLayout.createSequentialGroup()
|
||||
.addComponent(panelStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addGroup(panelLeftLayout.createSequentialGroup()
|
||||
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(comboBlm3, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
@@ -676,21 +703,29 @@ public class WireScan extends Panel {
|
||||
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(buttonHoming, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(buttonScannerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(buttonMotorPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))))
|
||||
.addComponent(buttonCalibration, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||
.addGroup(panelLeftLayout.createSequentialGroup()
|
||||
.addComponent(labelVelX, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel24)
|
||||
.addGroup(panelLeftLayout.createSequentialGroup()
|
||||
.addGap(98, 98, 98)
|
||||
.addComponent(labelVelY, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)))))))
|
||||
.addGap(0, 0, 0))
|
||||
);
|
||||
|
||||
panelLeftLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel10, jLabel11, jLabel13, jLabel14, jLabel15, jLabel16, jLabel17, jLabel18, jLabel19, jLabel2, jLabel20, jLabel21, jLabel3, jLabel4, jLabel5, jLabel6, jLabel7, jLabel8, jLabel9, labelEndY, labelStartY});
|
||||
panelLeftLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel10, jLabel11, jLabel13, jLabel14, jLabel15, jLabel16, jLabel17, jLabel18, jLabel19, jLabel2, jLabel20, jLabel21, jLabel23, jLabel24, jLabel3, jLabel4, jLabel5, jLabel6, jLabel7, jLabel8, jLabel9, labelEndY, labelStartY});
|
||||
|
||||
panelLeftLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonAbort, buttonMoveStart, buttonPark, buttonParkAll, buttonScan});
|
||||
|
||||
panelLeftLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonMotorPanel, buttonScannerPanel});
|
||||
panelLeftLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonCalibration, buttonScannerPanel});
|
||||
|
||||
panelLeftLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {labelPosX, labelPosY, panelPosition, panelRepRate});
|
||||
panelLeftLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {labelPosX, labelPosY, labelVelX, labelVelY, panelPosition, panelRepRate});
|
||||
|
||||
panelLeftLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {spinnerBackground, spinnerCycles, spinnerEndX, spinnerEndY});
|
||||
|
||||
panelLeftLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {spinnerBunch, spinnerStartX, spinnerStartY, spinnerVel});
|
||||
panelLeftLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {spinnerBunch, spinnerPoints, spinnerStartX, spinnerStartY});
|
||||
|
||||
panelLeftLayout.setVerticalGroup(
|
||||
panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@@ -710,7 +745,7 @@ public class WireScan extends Panel {
|
||||
.addComponent(spinnerCycles, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel9)
|
||||
.addComponent(spinnerVel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addComponent(spinnerPoints, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerBackground, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
@@ -765,12 +800,18 @@ public class WireScan extends Panel {
|
||||
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(jLabel13)
|
||||
.addComponent(labelPosX)
|
||||
.addComponent(buttonMotorPanel))
|
||||
.addComponent(buttonCalibration))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(jLabel14)
|
||||
.addComponent(labelPosY))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(jLabel23)
|
||||
.addComponent(labelVelX)
|
||||
.addComponent(jLabel24)
|
||||
.addComponent(labelVelY))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelLeftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(jLabel15)
|
||||
.addComponent(panelRepRate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
@@ -794,9 +835,9 @@ public class WireScan extends Panel {
|
||||
.addGap(0, 0, 0))
|
||||
);
|
||||
|
||||
panelLeftLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {labelPosX, labelPosY, panelPosition});
|
||||
panelLeftLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {labelPosX, labelPosY, labelVelX, labelVelY, panelPosition});
|
||||
|
||||
panelLeftLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {spinnerBunch, spinnerStartX, spinnerStartY, spinnerVel});
|
||||
panelLeftLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {spinnerBunch, spinnerPoints, spinnerStartX, spinnerStartY});
|
||||
|
||||
panelLeftLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {spinnerCycles, spinnerEndX, spinnerEndY});
|
||||
|
||||
@@ -850,7 +891,7 @@ public class WireScan extends Panel {
|
||||
comboBlm2.setSelectedItem((ret==null) ? "" : ret.get(1));
|
||||
int selection = Epics.get(currentScannner + ":WIRE_SP", Integer.class);
|
||||
//comboSelection.setSelectedIndex(selection); //TODO: FIX
|
||||
spinnerVel.setValue(Epics.get(currentScannner + ":SCAN_VELO_SP", Double.class));
|
||||
//spinnerPoints.setValue(Epics.get(currentScannner + ":SCAN_VELO_SP", Double.class));
|
||||
spinnerCycles.setValue(Epics.get(currentScannner + ":NB_CYCL_SP", Integer.class));
|
||||
Device scannerInfo = (Device)eval("new_scan_info_device(None, '" + currentScannner+ "')", true);
|
||||
setGlobalVar("scanner_info", scannerInfo);
|
||||
@@ -940,7 +981,7 @@ public class WireScan extends Panel {
|
||||
range.add(spinnerEndY.getValue());
|
||||
parameters.add(range);
|
||||
parameters.add(spinnerCycles.getValue());
|
||||
parameters.add(spinnerVel.getValue());
|
||||
parameters.add(spinnerPoints.getValue());
|
||||
ArrayList bpms = new ArrayList();
|
||||
for (JComboBox cb : bpmCombos){
|
||||
if (cb.getSelectedItem()!=null && (!cb.getSelectedItem().toString().isEmpty())){
|
||||
@@ -1021,14 +1062,19 @@ public class WireScan extends Panel {
|
||||
|
||||
//String caqtdm = "caqtdm -noMsg -stylefile sfop.qss -attach";
|
||||
String caqtdm = "caqtdm -noMsg -stylefile sfop.qss";
|
||||
private void buttonMotorPanelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonMotorPanelActionPerformed
|
||||
ch.psi.pshell.core.Plugin calibrationPlugin;
|
||||
private void buttonCalibrationActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonCalibrationActionPerformed
|
||||
try {
|
||||
String cmd = caqtdm + " -macro 'P=" + comboWireScanner.getSelectedItem() + ":,M=MOTOR_1' /sf/common/config/qt/motorx_all.ui";
|
||||
Runtime.getRuntime().exec(new String[]{"bash", "-c", cmd.toString()});
|
||||
//String cmd = caqtdm + " -macro 'P=" + comboWireScanner.getSelectedItem() + ":,M=MOTOR_1' /sf/common/config/qt/motorx_all.ui";
|
||||
//Runtime.getRuntime().exec(new String[]{"bash", "-c", cmd.toString()});false WireScanCalibration.java
|
||||
if (calibrationPlugin!=null){
|
||||
getContext().getPluginManager().unloadPlugin(calibrationPlugin);
|
||||
}
|
||||
calibrationPlugin = getContext().getPluginManager().loadInitializePlugin(getContext().getSetup().expandPath("{plugins}/WireScanCalibration.java"));
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonMotorPanelActionPerformed
|
||||
}//GEN-LAST:event_buttonCalibrationActionPerformed
|
||||
|
||||
private void buttonScannerPanelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonScannerPanelActionPerformed
|
||||
try {
|
||||
@@ -1091,8 +1137,8 @@ public class WireScan extends Panel {
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton buttonAbort;
|
||||
private javax.swing.JButton buttonCalibration;
|
||||
private javax.swing.JButton buttonHoming;
|
||||
private javax.swing.JButton buttonMotorPanel;
|
||||
private javax.swing.JButton buttonMoveStart;
|
||||
private javax.swing.JButton buttonPark;
|
||||
private javax.swing.JButton buttonParkAll;
|
||||
@@ -1123,6 +1169,8 @@ public class WireScan extends Panel {
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel20;
|
||||
private javax.swing.JLabel jLabel21;
|
||||
private javax.swing.JLabel jLabel23;
|
||||
private javax.swing.JLabel jLabel24;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JLabel jLabel4;
|
||||
private javax.swing.JLabel jLabel5;
|
||||
@@ -1134,6 +1182,8 @@ public class WireScan extends Panel {
|
||||
private javax.swing.JLabel labelPosX;
|
||||
private javax.swing.JLabel labelPosY;
|
||||
private javax.swing.JLabel labelStartY;
|
||||
private javax.swing.JLabel labelVelX;
|
||||
private javax.swing.JLabel labelVelY;
|
||||
private ch.psi.pshell.swing.Led ledHomed;
|
||||
private javax.swing.JPanel panelLeft;
|
||||
private ch.psi.pshell.swing.DeviceValuePanel panelPosition;
|
||||
@@ -1145,8 +1195,8 @@ public class WireScan extends Panel {
|
||||
private javax.swing.JSpinner spinnerCycles;
|
||||
private javax.swing.JSpinner spinnerEndX;
|
||||
private javax.swing.JSpinner spinnerEndY;
|
||||
private javax.swing.JSpinner spinnerPoints;
|
||||
private javax.swing.JSpinner spinnerStartX;
|
||||
private javax.swing.JSpinner spinnerStartY;
|
||||
private javax.swing.JSpinner spinnerVel;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user