This commit is contained in:
gac-S_Changer
2019-02-14 11:24:18 +01:00
parent 9767d75c0b
commit 66360f3d62
11 changed files with 248 additions and 51 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
#Thu Feb 14 11:00:38 CET 2019
#Thu Feb 14 11:23:32 CET 2019
barcode_reader_scan_pucks=true
dry_mount_counter=0
dry_timestamp=1.543854393748E9
-4
View File
@@ -100,9 +100,6 @@
</SubComponents>
</Container>
<Component class="ch.psi.pshell.swing.DeviceStatePanel" name="deviceStatePanel1">
<Properties>
<Property name="deviceName" type="java.lang.String" value="barcode_reader"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="deviceValuePanel1">
<Properties>
@@ -111,7 +108,6 @@
<TitledBorder title="Value"/>
</Border>
</Property>
<Property name="deviceName" type="java.lang.String" value="barcode_reader"/>
</Properties>
</Component>
</SubComponents>
+15 -7
View File
@@ -1,4 +1,5 @@
import ch.psi.pshell.core.Context;
import ch.psi.pshell.device.Device;
import ch.psi.pshell.swing.DevicePanel;
import ch.psi.utils.swing.SwingUtils;
import java.util.concurrent.CompletableFuture;
@@ -17,11 +18,21 @@ public class BarcodeReaderPanel extends DevicePanel {
CompletableFuture future;
@Override
public void setDevice(Device device){
super.setDevice(device);
if (device != null){
deviceStatePanel1.setDevice(device);
deviceValuePanel1.setDevice(device);
}
}
@Override
public void onTimer(){
if ((getDevice()!=null) && enabled){
if ((future==null) || (future.isDone())){
future = Context.getInstance().evalLineBackgroundAsync("barcode_reader.get()");
future = Context.getInstance().evalLineBackgroundAsync(getDevice().getName() + ".get()");
}
}
}
@@ -109,10 +120,7 @@ public class BarcodeReaderPanel extends DevicePanel {
.addContainerGap())
);
deviceStatePanel1.setDeviceName("barcode_reader");
deviceValuePanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Value"));
deviceValuePanel1.setDeviceName("barcode_reader");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
@@ -135,18 +143,18 @@ public class BarcodeReaderPanel extends DevicePanel {
}// </editor-fold>//GEN-END:initComponents
private void buttonEnableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonEnableActionPerformed
execute("barcode_reader.enable()", false);
execute(getDevice().getName() + ".enable()", false);
enabled = true;
}//GEN-LAST:event_buttonEnableActionPerformed
private void buttonDisableActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonDisableActionPerformed
enabled = false;
execute("barcode_reader.disable()", false);
execute(getDevice().getName() + ".disable()", false);
}//GEN-LAST:event_buttonDisableActionPerformed
private void buttonReadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonReadActionPerformed
enabled = false;
execute("barcode_reader.read(5.0) ", true);
execute(getDevice().getName() + ".read(5.0) ", true);
}//GEN-LAST:event_buttonReadActionPerformed
+2 -2
View File
@@ -132,7 +132,7 @@
<Component class="javax.swing.JSpinner" name="spinnerDryTime">
<Properties>
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
<SpinnerModel initial="30.0" maximum="30.0" minimum="1.0" numberType="java.lang.Double" stepSize="1.0" type="number"/>
<SpinnerModel initial="30.0" maximum="50.0" minimum="1.0" numberType="java.lang.Double" stepSize="1.0" type="number"/>
</Property>
</Properties>
<AuxValues>
@@ -150,7 +150,7 @@
<Component class="javax.swing.JSpinner" name="spinnerDrySpeed">
<Properties>
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
<SpinnerModel initial="0.5" maximum="10.0" minimum="0.1" numberType="java.lang.Double" stepSize="1.0" type="number"/>
<SpinnerModel initial="0.4" maximum="1.0" minimum="0.1" numberType="java.lang.Double" stepSize="0.1" type="number"/>
</Property>
</Properties>
<AuxValues>
+2 -2
View File
@@ -172,7 +172,7 @@ public class Commands extends Panel {
jLabel6.setText("Heat time(s):");
spinnerDryTime.setModel(new javax.swing.SpinnerNumberModel(30.0d, 1.0d, 30.0d, 1.0d));
spinnerDryTime.setModel(new javax.swing.SpinnerNumberModel(30.0d, 1.0d, 50.0d, 1.0d));
buttonDry.setText("Dry");
buttonDry.addActionListener(new java.awt.event.ActionListener() {
@@ -181,7 +181,7 @@ public class Commands extends Panel {
}
});
spinnerDrySpeed.setModel(new javax.swing.SpinnerNumberModel(0.5d, 0.1d, 10.0d, 1.0d));
spinnerDrySpeed.setModel(new javax.swing.SpinnerNumberModel(0.4d, 0.1d, 1.0d, 0.1d));
jLabel7.setText("Speed(%):");
+16 -1
View File
@@ -116,12 +116,19 @@
<Component id="jScrollPane1" pref="0" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="32767" attributes="0"/>
<Component id="buttonConfigure" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="jScrollPane1" pref="274" max="32767" attributes="0"/>
<Component id="jScrollPane1" pref="282" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="buttonConfigure" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
@@ -173,6 +180,14 @@
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JButton" name="buttonConfigure">
<Properties>
<Property name="text" type="java.lang.String" value="Configure"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonConfigureActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
<Component class="ch.psi.pshell.swing.DeviceStatePanel" name="deviceStatePanel1">
+30 -1
View File
@@ -78,6 +78,7 @@ public class PuckDetectionPanel extends DevicePanel {
jPanel1 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
table = new javax.swing.JTable();
buttonConfigure = new javax.swing.JButton();
deviceStatePanel1 = new ch.psi.pshell.swing.DeviceStatePanel();
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Raspberry Pi "));
@@ -186,6 +187,13 @@ public class PuckDetectionPanel extends DevicePanel {
});
jScrollPane1.setViewportView(table);
buttonConfigure.setText("Configure");
buttonConfigure.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonConfigureActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
@@ -194,11 +202,17 @@ public class PuckDetectionPanel extends DevicePanel {
.addContainerGap()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addContainerGap())
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonConfigure)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 274, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 282, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(buttonConfigure)
.addContainerGap())
);
@@ -236,9 +250,24 @@ public class PuckDetectionPanel extends DevicePanel {
execute("start_puck_detection()", false);
}//GEN-LAST:event_buttonPuckDetStartActionPerformed
private void buttonConfigureActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonConfigureActionPerformed
try {
if (table.getSelectedRow()<0){
throw new Exception("Select a puck");
}
String name = table.getModel().getValueAt(table.getSelectedRow(), 0).toString();
Puck puck = getDevice().getPuck(name);
DevicePanel.showConfigEditor(this, puck, true, false);
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_buttonConfigureActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton buttonConfigure;
private javax.swing.JButton buttonPuckDetCheck;
private javax.swing.JButton buttonPuckDetStart;
private javax.swing.JButton buttonPuckDetStop;
+1 -1
View File
@@ -17,7 +17,7 @@ public class Recovery extends Panel {
public Recovery() {
initComponents();
startTimer(5000, 200);
startTimer(2500, 200);
}
//Overridable callbacks
+72 -9
View File
@@ -18,10 +18,9 @@
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel1" max="32767" attributes="0"/>
<Component id="panelState" alignment="0" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="panelCurrent" max="32767" attributes="0"/>
<Component id="jPanel2" max="32767" attributes="0"/>
</Group>
<Component id="panelCurrent" max="32767" attributes="0"/>
<Component id="jPanel2" max="32767" attributes="0"/>
<Component id="jPanel3" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
@@ -33,6 +32,8 @@
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Component id="jPanel2" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Component id="jPanel3" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Component id="panelState" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
@@ -171,7 +172,7 @@
<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="Gonio"/>
<TitledBorder title="Supress"/>
</Border>
</Property>
</Properties>
@@ -183,7 +184,11 @@
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="ledMountPosition" min="-2" max="-2" attributes="0"/>
<Component id="ledSupressed" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="buttonSupressOn" linkSize="1" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="buttonSupressOff" linkSize="1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
@@ -194,7 +199,9 @@
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel2" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="ledMountPosition" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="ledSupressed" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="buttonSupressOn" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="buttonSupressOff" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
@@ -205,16 +212,72 @@
<Component class="javax.swing.JLabel" name="jLabel2">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Mount Position:"/>
<Property name="text" type="java.lang.String" value="Supressed:"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.Led" name="ledMountPosition">
<Component class="ch.psi.pshell.swing.Led" name="ledSupressed">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="SansSerif" size="18" style="0"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="buttonSupressOn">
<Properties>
<Property name="text" type="java.lang.String" value="On"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonSupressOnActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="buttonSupressOff">
<Properties>
<Property name="text" type="java.lang.String" value="Off"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonSupressOffActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanel3">
<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="Configuration"/>
</Border>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="32767" attributes="0"/>
<Component id="buttonConfiguration" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="buttonConfiguration" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JButton" name="buttonConfiguration">
<Properties>
<Property name="text" type="java.lang.String" value="Configuration"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonConfigurationActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
</SubComponents>
+108 -22
View File
@@ -5,8 +5,12 @@ import ch.psi.pshell.swing.DevicePanel;
import ch.psi.pshell.core.Context;
import ch.psi.utils.State;
import java.awt.Color;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.script.ScriptException;
/**
*
@@ -30,38 +34,37 @@ public class SmartMagnetPanel extends DevicePanel {
this.startTimer(1000, 100);
}
@Override
protected void onTimer(){
Color color = Color.RED;
try{
if (Context.getInstance().evalLineBackground("in_mount_position").equals(Boolean.TRUE)){
color = Color.GREEN;
}
} catch (Exception ex){
}
ledMountPosition.setColor(color);
}
@Override
protected void onDeviceStateChanged(State state, State former) {
switch(state){
case Paused:
ledSupressed.setColor(Color.ORANGE);
ledStatus.setColor(Color.GREEN);
ledMounted.setColor(Color.RED);
break;
case Ready:
ledSupressed.setColor(Color.BLACK);
ledStatus.setColor(Color.GREEN);
ledMounted.setColor(Color.GREEN);
break;
case Busy:
ledSupressed.setColor(Color.BLACK);
ledStatus.setColor(Color.GREEN);
ledMounted.setColor(Color.ORANGE);
break;
case Fault:
ledSupressed.setColor(Color.RED);
ledStatus.setColor(Color.RED);
ledMounted.setColor(Color.RED);
break;
default:
ledSupressed.setColor(Color.BLACK);
ledStatus.setColor(Color.BLACK);
ledMounted.setColor(Color.BLACK);
break;
}
buttonSupressOn.setEnabled((state==State.Ready) || (state == State.Busy));
buttonSupressOff.setEnabled(state == State.Paused);
}
@Override
@@ -89,7 +92,11 @@ public class SmartMagnetPanel extends DevicePanel {
panelCurrent = new ch.psi.pshell.swing.ProcessVariablePanel();
jPanel2 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
ledMountPosition = new ch.psi.pshell.swing.Led();
ledSupressed = new ch.psi.pshell.swing.Led();
buttonSupressOn = new javax.swing.JButton();
buttonSupressOff = new javax.swing.JButton();
jPanel3 = new javax.swing.JPanel();
buttonConfiguration = new javax.swing.JButton();
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Status"));
@@ -164,12 +171,26 @@ public class SmartMagnetPanel extends DevicePanel {
panelCurrent.setBorder(javax.swing.BorderFactory.createTitledBorder("Current"));
panelCurrent.setDeviceName("smc_current");
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Gonio"));
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Supress"));
jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel2.setText("Mount Position:");
jLabel2.setText("Supressed:");
ledMountPosition.setFont(new java.awt.Font("SansSerif", 0, 18)); // NOI18N
ledSupressed.setFont(new java.awt.Font("SansSerif", 0, 18)); // NOI18N
buttonSupressOn.setText("On");
buttonSupressOn.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonSupressOnActionPerformed(evt);
}
});
buttonSupressOff.setText("Off");
buttonSupressOff.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonSupressOffActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
@@ -179,16 +200,51 @@ public class SmartMagnetPanel extends DevicePanel {
.addContainerGap()
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(ledMountPosition, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(ledSupressed, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonSupressOn)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(buttonSupressOff)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonSupressOff, buttonSupressOn});
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel2)
.addComponent(ledMountPosition, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(ledSupressed, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(buttonSupressOn)
.addComponent(buttonSupressOff))
.addContainerGap())
);
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Configuration"));
buttonConfiguration.setText("Configuration");
buttonConfiguration.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonConfigurationActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonConfiguration)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addComponent(buttonConfiguration)
.addContainerGap())
);
@@ -198,9 +254,9 @@ public class SmartMagnetPanel extends DevicePanel {
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(panelState, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(panelCurrent, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addComponent(panelCurrent, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -211,21 +267,51 @@ public class SmartMagnetPanel extends DevicePanel {
.addGap(0, 0, 0)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, 0)
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, 0)
.addComponent(panelState, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);
}// </editor-fold>//GEN-END:initComponents
private void buttonSupressOnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSupressOnActionPerformed
try {
Context.getInstance().evalLineBackground("smart_magnet.set_supress(True)");
} catch (Exception ex) {
Logger.getLogger(SmartMagnetPanel.class.getName()).log(Level.SEVERE, null, ex);
}
}//GEN-LAST:event_buttonSupressOnActionPerformed
private void buttonSupressOffActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSupressOffActionPerformed
try {
Context.getInstance().evalLineBackground("smart_magnet.set_supress(False)");
} catch (Exception ex) {
Logger.getLogger(SmartMagnetPanel.class.getName()).log(Level.SEVERE, null, ex);
}
}//GEN-LAST:event_buttonSupressOffActionPerformed
private void buttonConfigurationActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonConfigurationActionPerformed
try {
this.showConfigEditor(true, false);
} catch (Exception ex) {
Logger.getLogger(SmartMagnetPanel.class.getName()).log(Level.SEVERE, null, ex);
}
}//GEN-LAST:event_buttonConfigurationActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton buttonConfiguration;
private javax.swing.JButton buttonSupressOff;
private javax.swing.JButton buttonSupressOn;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel5;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private ch.psi.pshell.swing.Led ledMountPosition;
private javax.swing.JPanel jPanel3;
private ch.psi.pshell.swing.Led ledMounted;
private ch.psi.pshell.swing.Led ledStatus;
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;
+1 -1
View File
@@ -154,7 +154,7 @@ class Hexiposi(DiscretePositionerBase):
#http://myriotell:8003/hexiposi/get
dev = Hexiposi("hexiposi", "myriotell")
#If no Rotation Lid is mounted set it to simulated
#dev.setSimulated()
dev.setSimulated()
add_device(dev, True)
hexiposi.polling=1000