Closedown

This commit is contained in:
boccioli_m
2015-10-08 14:42:36 +02:00
parent cb948868bb
commit b8cfa76f09
13 changed files with 222 additions and 855 deletions

View File

@@ -13,7 +13,7 @@ public class Kollimators extends javax.swing.JPanel {
/**
* Creates new form Kollimators
*/
public Kollimators() {
public Kollimators(String params) {
initComponents();
}

View File

@@ -220,7 +220,7 @@
<Container class="javax.swing.JPanel" name="jPanel1">
<Properties>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[100, 100]"/>
<Dimension value="[100, 200]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[110, 110]"/>
@@ -234,208 +234,224 @@
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<SubComponents>
<Component class="javax.swing.JButton" name="jButtonRun">
<Container class="javax.swing.JPanel" name="jPanelTopCommands">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons/play-circled-64-000000.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Run enabled tests"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[330000, 39]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[90, 90]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[90, 39]"/>
<Dimension value="[115, 100]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonRunActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Center"/>
</Constraint>
</Constraints>
</Component>
<Container class="javax.swing.JPanel" name="jPanelButtons">
<Properties>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[0, 80]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[100, 80]"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="East"/>
</Constraint>
</Constraints>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<SubComponents>
<Component class="javax.swing.JButton" name="jButtonOptions">
<Container class="javax.swing.JPanel" name="jPanelButtons">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons/settings-32px.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Optional actions"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[60, 40]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[0, 40]"/>
<Dimension value="[0, 80]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[50, 40]"/>
<Dimension value="[100, 80]"/>
</Property>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="East"/>
</Constraint>
</Constraints>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<SubComponents>
<Component class="javax.swing.JButton" name="jButtonOptions">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons/settings-32px.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Optional actions"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[60, 40]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[0, 40]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[50, 40]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonOptionsActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Before"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="jButtonSave">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons/android-save-24-000000.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Save current configuration"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[60, 40]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[0, 40]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[50, 40]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonSaveActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="After"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="jButtonOpen">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons/folder-open-24-000000.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Open configuration"/>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[0, 9]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[33, 50]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonOpenActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Last"/>
</Constraint>
</Constraints>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JButton" name="jButtonRun">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons/play-circled-64-000000.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Run enabled tests"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[330000, 39]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[90, 90]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[90, 39]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonOptionsActionPerformed"/>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonRunActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Center"/>
</Constraint>
</Constraints>
</Component>
<Container class="javax.swing.JPanel" name="jPanelSelection">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Before"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="jButtonSave">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons/android-save-24-000000.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Save current configuration"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[60, 40]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[0, 40]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[50, 40]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonSaveActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="After"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="jButtonOpen">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons/folder-open-24-000000.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Open configuration"/>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[0, 9]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[33, 50]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonOpenActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Last"/>
</Constraint>
</Constraints>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanel2">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Before"/>
</Constraint>
</Constraints>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<SubComponents>
<Component class="javax.swing.JCheckBox" name="jCheckBoxEnableDisable">
<Properties>
<Property name="toolTipText" type="java.lang.String" value="Enable/Disable the selected tests"/>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jCheckBoxEnableDisableActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="West"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="jButtonMoveDown">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons/chevron-down-16-000000.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Move the selected tests down"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[25, 25]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[25, 25]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[25, 25]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonMoveDownActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="South"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="jButtonMoveUp">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons/chevron-up-16-000000.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Move the selected tests up"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[25, 25]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[25, 25]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[25, 25]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonMoveUpActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="First"/>
</Constraint>
</Constraints>
</Component>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<SubComponents>
<Component class="javax.swing.JCheckBox" name="jCheckBoxEnableDisable">
<Properties>
<Property name="toolTipText" type="java.lang.String" value="Enable/Disable the selected tests"/>
<Property name="horizontalAlignment" type="int" value="0"/>
<Property name="horizontalTextPosition" type="int" value="0"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jCheckBoxEnableDisableActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="West"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="jButtonMoveDown">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons/chevron-down-16-000000.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Move the selected tests down"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[25, 25]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[25, 25]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[25, 25]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonMoveDownActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="South"/>
</Constraint>
</Constraints>
</Component>
<Component class="javax.swing.JButton" name="jButtonMoveUp">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/icons/chevron-up-16-000000.png"/>
</Property>
<Property name="toolTipText" type="java.lang.String" value="Move the selected tests up"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[25, 25]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[25, 25]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[25, 25]"/>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonMoveUpActionPerformed"/>
</Events>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="First"/>
</Constraint>
</Constraints>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanelCustom">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Last"/>
</Constraint>
</Constraints>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
</Container>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanelCustom">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
<BorderConstraints direction="Last"/>
</Constraint>
</Constraints>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
</Container>
</SubComponents>
</Form>

View File

@@ -318,7 +318,8 @@ public class TestingList extends Panel {
try {
//create a class to visualise the details panel
Class testingListDetailsClass = getController().getClassByName("Kollimators");
JPanel detailsPanel = (JPanel) testingListDetailsClass.getConstructor(null).newInstance(new Object[]{null});
JPanel detailsPanel = (JPanel) testingListDetailsClass.getConstructor(new Class[]{String.class}).newInstance(new Object[]{""});
this.jPanelCustom.add(detailsPanel);
} catch (ClassNotFoundException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
} catch (NoSuchMethodException ex) {
@@ -413,12 +414,13 @@ public class TestingList extends Panel {
jScrollPane2 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
jPanel1 = new javax.swing.JPanel();
jButtonRun = new javax.swing.JButton();
jPanelTopCommands = new javax.swing.JPanel();
jPanelButtons = new javax.swing.JPanel();
jButtonOptions = new javax.swing.JButton();
jButtonSave = new javax.swing.JButton();
jButtonOpen = new javax.swing.JButton();
jPanel2 = new javax.swing.JPanel();
jButtonRun = new javax.swing.JButton();
jPanelSelection = new javax.swing.JPanel();
jCheckBoxEnableDisable = new javax.swing.JCheckBox();
jButtonMoveDown = new javax.swing.JButton();
jButtonMoveUp = new javax.swing.JButton();
@@ -595,21 +597,12 @@ public class TestingList extends Panel {
add(jScrollPane2, java.awt.BorderLayout.CENTER);
jPanel1.setMinimumSize(new java.awt.Dimension(100, 100));
jPanel1.setMinimumSize(new java.awt.Dimension(100, 200));
jPanel1.setPreferredSize(new java.awt.Dimension(110, 110));
jPanel1.setLayout(new java.awt.BorderLayout());
jButtonRun.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/play-circled-64-000000.png"))); // NOI18N
jButtonRun.setToolTipText("Run enabled tests");
jButtonRun.setMaximumSize(new java.awt.Dimension(330000, 39));
jButtonRun.setMinimumSize(new java.awt.Dimension(90, 90));
jButtonRun.setPreferredSize(new java.awt.Dimension(90, 39));
jButtonRun.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonRunActionPerformed(evt);
}
});
jPanel1.add(jButtonRun, java.awt.BorderLayout.CENTER);
jPanelTopCommands.setMinimumSize(new java.awt.Dimension(115, 100));
jPanelTopCommands.setLayout(new java.awt.BorderLayout());
jPanelButtons.setMinimumSize(new java.awt.Dimension(0, 80));
jPanelButtons.setPreferredSize(new java.awt.Dimension(100, 80));
@@ -650,9 +643,21 @@ public class TestingList extends Panel {
});
jPanelButtons.add(jButtonOpen, java.awt.BorderLayout.PAGE_END);
jPanel1.add(jPanelButtons, java.awt.BorderLayout.EAST);
jPanelTopCommands.add(jPanelButtons, java.awt.BorderLayout.EAST);
jPanel2.setLayout(new java.awt.BorderLayout());
jButtonRun.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/play-circled-64-000000.png"))); // NOI18N
jButtonRun.setToolTipText("Run enabled tests");
jButtonRun.setMaximumSize(new java.awt.Dimension(330000, 39));
jButtonRun.setMinimumSize(new java.awt.Dimension(90, 90));
jButtonRun.setPreferredSize(new java.awt.Dimension(90, 39));
jButtonRun.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButtonRunActionPerformed(evt);
}
});
jPanelTopCommands.add(jButtonRun, java.awt.BorderLayout.CENTER);
jPanelSelection.setLayout(new java.awt.BorderLayout());
jCheckBoxEnableDisable.setToolTipText("Enable/Disable the selected tests");
jCheckBoxEnableDisable.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
@@ -662,7 +667,7 @@ public class TestingList extends Panel {
jCheckBoxEnableDisableActionPerformed(evt);
}
});
jPanel2.add(jCheckBoxEnableDisable, java.awt.BorderLayout.WEST);
jPanelSelection.add(jCheckBoxEnableDisable, java.awt.BorderLayout.WEST);
jButtonMoveDown.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/chevron-down-16-000000.png"))); // NOI18N
jButtonMoveDown.setToolTipText("Move the selected tests down");
@@ -674,7 +679,7 @@ public class TestingList extends Panel {
jButtonMoveDownActionPerformed(evt);
}
});
jPanel2.add(jButtonMoveDown, java.awt.BorderLayout.SOUTH);
jPanelSelection.add(jButtonMoveDown, java.awt.BorderLayout.SOUTH);
jButtonMoveUp.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icons/chevron-up-16-000000.png"))); // NOI18N
jButtonMoveUp.setToolTipText("Move the selected tests up");
@@ -686,12 +691,14 @@ public class TestingList extends Panel {
jButtonMoveUpActionPerformed(evt);
}
});
jPanel2.add(jButtonMoveUp, java.awt.BorderLayout.PAGE_START);
jPanelSelection.add(jButtonMoveUp, java.awt.BorderLayout.PAGE_START);
jPanel1.add(jPanel2, java.awt.BorderLayout.LINE_START);
jPanel1.add(jPanelCustom, java.awt.BorderLayout.PAGE_END);
jPanelTopCommands.add(jPanelSelection, java.awt.BorderLayout.LINE_START);
jPanel1.add(jPanelTopCommands, java.awt.BorderLayout.CENTER);
add(jPanel1, java.awt.BorderLayout.NORTH);
add(jPanelCustom, java.awt.BorderLayout.PAGE_END);
}// </editor-fold>//GEN-END:initComponents
private void jButtonRunActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRunActionPerformed
@@ -985,9 +992,10 @@ public class TestingList extends Panel {
private javax.swing.JMenuItem jMenuItemShowDetails;
private javax.swing.JMenu jMenuSelect;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanelButtons;
private javax.swing.JPanel jPanelCustom;
private javax.swing.JPanel jPanelSelection;
private javax.swing.JPanel jPanelTopCommands;
private javax.swing.JPopupMenu jPopupMenuConfigs;
private javax.swing.JPopupMenu jPopupMenuOptions;
private javax.swing.JPopupMenu jPopupMenuTable;

View File

@@ -1,161 +0,0 @@
#Script Motor Test 3
#Moves from CCW to CW as a series of discrete translations (C times) logs after each translation. When end switch is encountered change direction. Repeat N times
time.sleep(5)
import traceback
#by default, failed
ret = 'Test failed'
status = False
DEVICE="PO2DV-NCS-LS"
params = parameters
print "100ms params: "
print params
#TODO: Set the diplay names of positioners and detectors
#scan = ManualScan(['idX', 'idInkr'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idPotiProc', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [-0.5, 0.0], [4.0, 3000.0], [3000, 20])
scan = ManualScan(['idX'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idPotiProc', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [ 0.0], [ 3000.0], [20])
scan.setPlotName("Bla")
scan.start()
#Creating channels: dimension 1
try:
#RegionPositioner idInkr
#idInkr = Channel(DEVICE+':INKR:2', type = 'd')
idInkr = Channel(DEVICE+':MOTOR.VAL', type = 'd')
#ScalarDetector idMotorStatus
#idMotorStatus = Channel(DEVICE+':STA:1', type = 'd')
idMotorStatus = Channel(DEVICE+':MOTOR.MSTA', type = 'd')
#ScalarDetector idLogicalPosition
#idLogicalPosition = Channel(DEVICE+':IST:2', type = 'd')
idLogicalPosition = Channel(DEVICE+':MOTOR.RVAL', type = 'd')
#ScalarDetector idDiameter
#idDiameter = Channel(DEVICE+':DIAM:2', type = 'd')
idDiameter = Channel(DEVICE+':ENCODERoff', type = 'd')
#ScalarDetector idMotorPosition
#idMotorPosition = Channel(DEVICE+':IST1:2', type = 'd')
idMotorPosition = Channel(DEVICE+':MOTOR.RBV', type = 'd')
#ScalarDetector idPotiRaw
#idPotiRaw = Channel(DEVICE+':POSA:1', type = 'd')
idPotiRaw = Channel(DEVICE+':ENCODERraw', type = 'd')
#ScalarDetector idPotiProc
#idPotiProc = Channel(DEVICE+':POSA:2', type = 'd')
idPotiProc = Channel(DEVICE+':ENCODER', type = 'd')
#ScalarDetector idBtvsRaw
#idBtvsRaw = Channel(DEVICE+':IST3:1', type = 'd')
idBtvsRaw = Channel(DEVICE+':MOTOR.LLS', type = 'd')
#ScalarDetector idBtvsProc
#idBtvsProc = Channel(DEVICE+':IST3:2', type = 'd')
idBtvsProc = Channel(DEVICE+':MOTOR.HLS', type = 'd')
#ScalarDetector idEndSwitchL
#idBtvsRaw = Channel(DEVICE+':IST3:1', type = 'd')
idEndSwitchL = Channel(DEVICE+':MOTOR.LLS', type = 'd')
#ScalarDetector idEndSwitchH
#idBtvsProc = Channel(DEVICE+':IST3:2', type = 'd')
idEndSwitchH = Channel(DEVICE+':MOTOR.HLS', type = 'd')
#high position limit
idLimitH = Channel(DEVICE+':MOTOR.HLM', type = 'd')
#low position limit
idLimitL = Channel(DEVICE+':MOTOR.LLM', type = 'd')
except:
print "Unexpected error:", sys.exc_info()[0]
ret = 'Unable to create channel - ' + traceback.format_exc()
success = False
raise
sys.exit()
#remove limits
idLimitH.put(999999.9, timeout=None)
idLimitL.put(-999999.9, timeout=None)
#Dimension 1
direction = 1.0;
startDefault = -100.0
endDefault = 1000.0
end = endDefault
#find position at Low end switch: it will be the starting point of the test
idInkr.put(-100.0, timeout=None) # TODO: Set appropriate timeout
start = idInkr.get()+direction
countSteps = 0
count = 0
for setpoint1 in range(0, 0):
count = count + 1
sleep( 5 ) # Settling time
#RegionPositioner idInkr
for setpoint2 in frange(start, end, direction):
readback1 = setpoint1
idInkr.put(setpoint2, timeout=None) # TODO: Set appropriate timeout
sleep( 0.1 ) # Settling time
readback2 = idInkr.get()
#if abs(readback2 - setpoint2) > 1 : # TODO: Check accuracy
# ret = 'Actor idInkr could not be set to the value ' + str(setpoint2) + ' (current value: ' + str(readback2) + ')'
# success = False
# raise Exception(ret)
#Detector idMotorStatus
detector1 = idMotorStatus.get()
#Detector idLogicalPosition
detector2 = idLogicalPosition.get()
#Detector idDiameter
detector3 = idDiameter.get()
#Detector idMotorPosition
detector4 = idMotorPosition.get()
#Detector idPotiRaw
detector5 = idPotiRaw.get()
#Detector idPotiProc
detector6 = idPotiProc.get()
#Detector idBtvsRaw
detector7 = idBtvsRaw.get()
#Detector idBtvsProc
detector8 = idBtvsProc.get()
#end switches
endH = idEndSwitchH.get()
endL = idEndSwitchL.get()
#Manipulation idDiff02
#Variable Mappings
a = detector4
b = detector8
idDiff02 = a-b
#Manipulation idDiff01
#Variable Mappings
a = detector4
b = detector6
idDiff01 = a-b
countSteps = countSteps + 1
scan.append ([countSteps], [countSteps], [detector1, detector2, detector3, detector4, detector5, detector6, detector7, detector8, idDiff02, idDiff01])
if endH>0.0 :
#invert direction and swap start with end of translation
end = startDefault
start = readback2 - direction
direction = -1.0
print 'End H switch, changing direction to ' + str(direction)
break
if endL>0.0 :
#invert direction and swap start with end of translation
end = endDefault
start = readback2 - direction
direction = 1.0
print 'End L switch, changing direction to ' + str(direction)
break
#set limits back
idLimitH.put(145.0, timeout=None)
idLimitL.put(0.0, timeout=None)
#Closing channels
idInkr.close()
idMotorStatus.close()
idLogicalPosition.close()
idDiameter.close()
idMotorPosition.close()
idPotiRaw.close()
idPotiProc.close()
idBtvsRaw.close()
idBtvsProc.close()
scan.end()
ret = 'Slide moved back and forth (' + str(count) + ' runs)'
status = True
set_return("OK")

View File

@@ -1,157 +0,0 @@
#Script Motor Test 3
#Moves from CCW to CW as a series of discrete translations (C times) logs after each translation. When end switch is encountered change direction. Repeat N times
time.sleep(2)
import traceback
#by default, failed
ret = 'Test failed'
status = False
DEVICE="PO2DV-NCS-LS"
#TODO: Set the diplay names of positioners and detectors
#scan = ManualScan(['idX', 'idInkr'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idPotiProc', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [-0.5, 0.0], [4.0, 3000.0], [3000, 20])
scan = ManualScan(['idX'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idPotiProc', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [ 0.0], [ 3000.0], [20])
scan.setPlotName("Bla")
scan.start()
#Creating channels: dimension 1
try:
#RegionPositioner idInkr
#idInkr = Channel(DEVICE+':INKR:2', type = 'd')
idInkr = Channel(DEVICE+':MOTOR.VAL', type = 'd')
#ScalarDetector idMotorStatus
#idMotorStatus = Channel(DEVICE+':STA:1', type = 'd')
idMotorStatus = Channel(DEVICE+':MOTOR.MSTA', type = 'd')
#ScalarDetector idLogicalPosition
#idLogicalPosition = Channel(DEVICE+':IST:2', type = 'd')
idLogicalPosition = Channel(DEVICE+':MOTOR.RVAL', type = 'd')
#ScalarDetector idDiameter
#idDiameter = Channel(DEVICE+':DIAM:2', type = 'd')
idDiameter = Channel(DEVICE+':ENCODERoff', type = 'd')
#ScalarDetector idMotorPosition
#idMotorPosition = Channel(DEVICE+':IST1:2', type = 'd')
idMotorPosition = Channel(DEVICE+':MOTOR.RBV', type = 'd')
#ScalarDetector idPotiRaw
#idPotiRaw = Channel(DEVICE+':POSA:1', type = 'd')
idPotiRaw = Channel(DEVICE+':ENCODERraw', type = 'd')
#ScalarDetector idPotiProc
#idPotiProc = Channel(DEVICE+':POSA:2', type = 'd')
idPotiProc = Channel(DEVICE+':ENCODER', type = 'd')
#ScalarDetector idBtvsRaw
#idBtvsRaw = Channel(DEVICE+':IST3:1', type = 'd')
idBtvsRaw = Channel(DEVICE+':MOTOR.LLS', type = 'd')
#ScalarDetector idBtvsProc
#idBtvsProc = Channel(DEVICE+':IST3:2', type = 'd')
idBtvsProc = Channel(DEVICE+':MOTOR.HLS', type = 'd')
#ScalarDetector idEndSwitchL
#idBtvsRaw = Channel(DEVICE+':IST3:1', type = 'd')
idEndSwitchL = Channel(DEVICE+':MOTOR.LLS', type = 'd')
#ScalarDetector idEndSwitchH
#idBtvsProc = Channel(DEVICE+':IST3:2', type = 'd')
idEndSwitchH = Channel(DEVICE+':MOTOR.HLS', type = 'd')
#high position limit
idLimitH = Channel(DEVICE+':MOTOR.HLM', type = 'd')
#low position limit
idLimitL = Channel(DEVICE+':MOTOR.LLM', type = 'd')
except:
print "Unexpected error:", sys.exc_info()[0]
ret = 'Unable to create channel - ' + traceback.format_exc()
success = False
raise
sys.exit()
#remove limits
idLimitH.put(999999.9, timeout=None)
idLimitL.put(-999999.9, timeout=None)
#Dimension 1
direction = 1.0;
startDefault = -100.0
endDefault = 10.0
end = endDefault
#find position at Low end switch: it will be the starting point of the test
idInkr.put(-100.0, timeout=None) # TODO: Set appropriate timeout
start = idInkr.get()+direction
countSteps = 0
count = 0
for setpoint1 in range(0, 0):
count = count + 1
sleep( 5 ) # Settling time
#RegionPositioner idInkr
for setpoint2 in frange(start, end, direction):
readback1 = setpoint1
idInkr.put(setpoint2, timeout=None) # TODO: Set appropriate timeout
sleep( 0.2 ) # Settling time
readback2 = idInkr.get()
#if abs(readback2 - setpoint2) > 1 : # TODO: Check accuracy
# ret = 'Actor idInkr could not be set to the value ' + str(setpoint2) + ' (current value: ' + str(readback2) + ')'
# success = False
# raise Exception(ret)
#Detector idMotorStatus
detector1 = idMotorStatus.get()
#Detector idLogicalPosition
detector2 = idLogicalPosition.get()
#Detector idDiameter
detector3 = idDiameter.get()
#Detector idMotorPosition
detector4 = idMotorPosition.get()
#Detector idPotiRaw
detector5 = idPotiRaw.get()
#Detector idPotiProc
detector6 = idPotiProc.get()
#Detector idBtvsRaw
detector7 = idBtvsRaw.get()
#Detector idBtvsProc
detector8 = idBtvsProc.get()
#end switches
endH = idEndSwitchH.get()
endL = idEndSwitchL.get()
#Manipulation idDiff02
#Variable Mappings
a = detector4
b = detector8
idDiff02 = a-b
#Manipulation idDiff01
#Variable Mappings
a = detector4
b = detector6
idDiff01 = a-b
countSteps = countSteps + 1
scan.append ([countSteps], [countSteps], [detector1, detector2, detector3, detector4, detector5, detector6, detector7, detector8, idDiff02, idDiff01])
if endH>0.0 :
#invert direction and swap start with end of translation
end = startDefault
start = readback2 - direction
direction = -1.0
print 'End H switch, changing direction to ' + str(direction)
break
if endL>0.0 :
#invert direction and swap start with end of translation
end = endDefault
start = readback2 - direction
direction = 1.0
print 'End L switch, changing direction to ' + str(direction)
break
#set limits back
idLimitH.put(145.0, timeout=None)
idLimitL.put(0.0, timeout=None)
#Closing channels
idInkr.close()
idMotorStatus.close()
idLogicalPosition.close()
idDiameter.close()
idMotorPosition.close()
idPotiRaw.close()
idPotiProc.close()
idBtvsRaw.close()
idBtvsProc.close()
scan.end()
ret = 'Slide moved back and forth (' + str(count) + ' runs)'
status = True
set_return("OK2")

View File

@@ -1,153 +0,0 @@
#Script Motor Test 3
#Moves from CCW to CW as a series of discrete translations (C times) logs after each translation. When end switch is encountered change direction. Repeat N times
import traceback
#by default, failed
ret = 'Test failed'
status = False
#TODO: Set the diplay names of positioners and detectors
#scan = ManualScan(['idX', 'idInkr'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idPotiProc', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [-0.5, 0.0], [4.0, 3000.0], [3000, 20])
scan = ManualScan(['idX'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idPotiProc', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [ 0.0], [ 3000.0], [20])
scan.start()
#Creating channels: dimension 1
try:
#RegionPositioner idInkr
#idInkr = Channel(DEVICE+':INKR:2', type = 'd')
idInkr = Channel(DEVICE+':MOTOR.VAL', type = 'd')
#ScalarDetector idMotorStatus
#idMotorStatus = Channel(DEVICE+':STA:1', type = 'd')
idMotorStatus = Channel(DEVICE+':MOTOR.MSTA', type = 'd')
#ScalarDetector idLogicalPosition
#idLogicalPosition = Channel(DEVICE+':IST:2', type = 'd')
idLogicalPosition = Channel(DEVICE+':MOTOR.RVAL', type = 'd')
#ScalarDetector idDiameter
#idDiameter = Channel(DEVICE+':DIAM:2', type = 'd')
idDiameter = Channel(DEVICE+':ENCODERoff', type = 'd')
#ScalarDetector idMotorPosition
#idMotorPosition = Channel(DEVICE+':IST1:2', type = 'd')
idMotorPosition = Channel(DEVICE+':MOTOR.RBV', type = 'd')
#ScalarDetector idPotiRaw
#idPotiRaw = Channel(DEVICE+':POSA:1', type = 'd')
idPotiRaw = Channel(DEVICE+':ENCODERraw', type = 'd')
#ScalarDetector idPotiProc
#idPotiProc = Channel(DEVICE+':POSA:2', type = 'd')
idPotiProc = Channel(DEVICE+':ENCODER', type = 'd')
#ScalarDetector idBtvsRaw
#idBtvsRaw = Channel(DEVICE+':IST3:1', type = 'd')
idBtvsRaw = Channel(DEVICE+':MOTOR.LLS', type = 'd')
#ScalarDetector idBtvsProc
#idBtvsProc = Channel(DEVICE+':IST3:2', type = 'd')
idBtvsProc = Channel(DEVICE+':MOTOR.HLS', type = 'd')
#ScalarDetector idEndSwitchL
#idBtvsRaw = Channel(DEVICE+':IST3:1', type = 'd')
idEndSwitchL = Channel(DEVICE+':MOTOR.LLS', type = 'd')
#ScalarDetector idEndSwitchH
#idBtvsProc = Channel(DEVICE+':IST3:2', type = 'd')
idEndSwitchH = Channel(DEVICE+':MOTOR.HLS', type = 'd')
#high position limit
idLimitH = Channel(DEVICE+':MOTOR.HLM', type = 'd')
#low position limit
idLimitL = Channel(DEVICE+':MOTOR.LLM', type = 'd')
except:
print "Unexpected error:", sys.exc_info()[0]
ret = 'Unable to create channel - ' + traceback.format_exc()
success = False
raise
sys.exit()
#remove limits
idLimitH.put(999999.9, timeout=None)
idLimitL.put(-999999.9, timeout=None)
#Dimension 1
direction = 1.0;
startDefault = -100.0
endDefault = 1000.0
end = endDefault
#find position at Low end switch: it will be the starting point of the test
idInkr.put(-100.0, timeout=None) # TODO: Set appropriate timeout
start = idInkr.get()+direction
countSteps = 0
count = 0
for setpoint1 in range(0, 10):
count = count + 1
sleep( 5 ) # Settling time
#RegionPositioner idInkr
for setpoint2 in frange(start, end, direction):
readback1 = setpoint1
idInkr.put(setpoint2, timeout=None) # TODO: Set appropriate timeout
sleep( 0.5 ) # Settling time
readback2 = idInkr.get()
#if abs(readback2 - setpoint2) > 1 : # TODO: Check accuracy
# ret = 'Actor idInkr could not be set to the value ' + str(setpoint2) + ' (current value: ' + str(readback2) + ')'
# success = False
# raise Exception(ret)
#Detector idMotorStatus
detector1 = idMotorStatus.get()
#Detector idLogicalPosition
detector2 = idLogicalPosition.get()
#Detector idDiameter
detector3 = idDiameter.get()
#Detector idMotorPosition
detector4 = idMotorPosition.get()
#Detector idPotiRaw
detector5 = idPotiRaw.get()
#Detector idPotiProc
detector6 = idPotiProc.get()
#Detector idBtvsRaw
detector7 = idBtvsRaw.get()
#Detector idBtvsProc
detector8 = idBtvsProc.get()
#end switches
endH = idEndSwitchH.get()
endL = idEndSwitchL.get()
#Manipulation idDiff02
#Variable Mappings
a = detector4
b = detector8
idDiff02 = a-b
#Manipulation idDiff01
#Variable Mappings
a = detector4
b = detector6
idDiff01 = a-b
countSteps = countSteps + 1
scan.append ([countSteps], [countSteps], [detector1, detector2, detector3, detector4, detector5, detector6, detector7, detector8, idDiff02, idDiff01])
if endH>0.0 :
#invert direction and swap start with end of translation
end = startDefault
start = readback2 - direction
direction = -1.0
print 'End H switch, changing direction to ' + str(direction)
break
if endL>0.0 :
#invert direction and swap start with end of translation
end = endDefault
start = readback2 - direction
direction = 1.0
print 'End L switch, changing direction to ' + str(direction)
break
#set limits back
idLimitH.put(145.0, timeout=None)
idLimitL.put(0.0, timeout=None)
#Closing channels
idInkr.close()
idMotorStatus.close()
idLogicalPosition.close()
idDiameter.close()
idMotorPosition.close()
idPotiRaw.close()
idPotiProc.close()
idBtvsRaw.close()
idBtvsProc.close()
scan.end()
ret = 'Slide moved back and forth (' + str(count) + ' runs)'
status = True

View File

@@ -1,81 +0,0 @@
#Script imported from: Motor Test 3 - with original pv.xml
#TODO: Set the diplay names of positioners and detectors
scan = ManualScan(['idX', 'idInkr'], ['idMotorStatus', 'idLogicalPosition', 'idDiameter', 'idMotorPosition', 'idPotiRaw', 'idPotiProc', 'idBtvsRaw', 'idBtvsProc', 'idDiff01', 'idDiff02'] , [0.0, 0.0], [3000.0, 10.0], [3000, 20])
scan.start()
#Creating channels: dimension 1
#PseudoPositioner idX
#RegionPositioner idInkr
idInkr = Channel('{DEVICE}:INKR:2', type = 'd')
#ScalarDetector idMotorStatus
idMotorStatus = Channel('{DEVICE}:STA:1', type = 'd')
#ScalarDetector idLogicalPosition
idLogicalPosition = Channel('{DEVICE}:IST:2', type = 'd')
#ScalarDetector idDiameter
idDiameter = Channel('{DEVICE}:DIAM:2', type = 'd')
#ScalarDetector idMotorPosition
idMotorPosition = Channel('{DEVICE}:IST1:2', type = 'd')
#ScalarDetector idPotiRaw
idPotiRaw = Channel('{DEVICE}:POSA:1', type = 'd')
#ScalarDetector idPotiProc
idPotiProc = Channel('{DEVICE}:POSA:2', type = 'd')
#ScalarDetector idBtvsRaw
idBtvsRaw = Channel('{DEVICE}:IST3:1', type = 'd')
#ScalarDetector idBtvsProc
idBtvsProc = Channel('{DEVICE}:IST3:2', type = 'd')
#Dimension 1
#PseudoPositioner idX
for setpoint1 in range(0, 3000):
readback1 = setpoint1
sleep( 0.1 ) # Settling time
#RegionPositioner idInkr
for setpoint2 in frange(0.0, 10.0, 1.0, True) + frange(11.0, 0.0, -1.0, True):
idInkr.put(setpoint2, timeout=None) # TODO: Set appropriate timeout
readback2 = idInkr.get()
if abs(readback2 - setpoint2) > -0.5 : # TODO: Check accuracy
raise Exception('Actor idInkr could not be set to the value ' + str(setpoint2))
sleep( 5.0 ) # Settling time
#Detector idMotorStatus
detector1 = idMotorStatus.get()
#Detector idLogicalPosition
detector2 = idLogicalPosition.get()
#Detector idDiameter
detector3 = idDiameter.get()
#Detector idMotorPosition
detector4 = idMotorPosition.get()
#Detector idPotiRaw
detector5 = idPotiRaw.get()
#Detector idPotiProc
detector6 = idPotiProc.get()
#Detector idBtvsRaw
detector7 = idBtvsRaw.get()
#Detector idBtvsProc
detector8 = idBtvsProc.get()
#Manipulation idDiff02
#Variable Mappings
a = detector4
b = detector8
count = setpoint1
idDiff02 = a-b
#Manipulation idDiff01
#Variable Mappings
a = detector4
b = detector6
count = setpoint1
idDiff01 = a-b
scan.append ([setpoint1, setpoint2], [readback1, readback2], [detector1, detector2, detector3, detector4, detector5, detector6, detector7, detector8, idDiff02, idDiff01])
#Closing channels
idInkr.close()
idMotorStatus.close()
idLogicalPosition.close()
idDiameter.close()
idMotorPosition.close()
idPotiRaw.close()
idPotiProc.close()
idBtvsRaw.close()
idBtvsProc.close()
scan.end()

View File

@@ -1 +0,0 @@
set_return("OK dammy")

View File

@@ -1,22 +0,0 @@
global print_log, sendFeedback, inspect
import sys, inspect, os, traceback, time
def print_log(testName, DEVICE, text):
time.ctime()
now = time.strftime('%Y.%m.%d %H:%M:%S')
textToLog = now + ' ' + DEVICE + ' - ' + testName + ': ' + str(text)
print textToLog
#prepare and send feedback to calling tool
def buildFeedback(testPath, testName, DEVICE, returnString, testPassed):
print_log(testName, DEVICE, 'End of test. Result:')
print_log(testName, DEVICE, 'Device: ' + DEVICE)
print_log(testName, DEVICE, 'Test name: ' + testName)
print_log(testName, DEVICE, 'Test path: ' + testPath)
print_log(testName, DEVICE, 'Test passed: ' + str(testPassed))
print_log(testName, DEVICE, 'Return string: ' + returnString)
ret = [testPath, DEVICE, returnString, testPassed]
return ret

View File

@@ -1,15 +0,0 @@
global aa
global bb
def bb():
print "bb"
def aa():
print "aa"
bb()
print 'testLocalVar1- a: ' + str(a)
print 'testLocalVar1- b: ' + str(b)
time.ctime()
print time.strftime('%Y.%m.%d %H:%M:%S')
bb()
aa()
set_return("OK 1")

View File

@@ -1,7 +0,0 @@
print 'testLocalVar2- a: ' + str(a)
print 'testLocalVar2- b: ' + str(b)
time.ctime()
print time.strftime('%Y.%m.%d %H:%M:%S')
set_return("OK 2")

View File

@@ -1,24 +0,0 @@
global print_log, sendFeedback, sys, inspect, os, traceback
import sys, inspect, os, traceback
def print_log(testName, DEVICE, text):
import time
time.ctime()
now = time.strftime('%Y.%m.%d %H:%M:%S')
print now + ' ' + DEVICE + ' - ' + testName + ': ' + str(text)
#prepare and send feedback to calling tool
def sendFeedback(testPath, testName, DEVICE, returnString, testPassed):
print_log(testName, DEVICE, 'End of test. Result:')
print_log(testName, DEVICE, 'Device: ' + DEVICE)
print_log(testName, DEVICE, 'Test name: ' + testName)
print_log(testName, DEVICE, 'Test path: ' + testPath)
print_log(testName, DEVICE, 'Test passed: ' + str(testPassed))
print_log(testName, DEVICE, 'Return string: ' + returnString)
ret = [testPath, DEVICE, returnString, testPassed]
return ret
pippo = 'pippo'
def print_pio():
print 'piopio'

View File

@@ -1,36 +0,0 @@
global print_log, sendFeedback, sys, inspect, os, traceback
import sys, inspect, os, traceback
class TestingTool:
pippo = 'pippo'
deviceName = ''
testName = ''
testPath = ''
def __init__(self, testName, testPath, deviceName):
self.deviceName = deviceName
self.testName = testName
self.testPath = testPath
def print_log(self, text):
import time
time.ctime()
now = time.strftime('%Y.%m.%d %H:%M:%S')
print now + ' ' + self.deviceName + ' - ' + self.testName + ': ' + str(text)
#prepare and send feedback to calling tool
def sendFeedback(self, returnString, testPassed):
self.print_log('End of test. Result:')
self.print_log('Device: ' + self.deviceName)
self.print_log('Test name: ' + self.testName)
self.print_log('Test path: ' + self.testPath)
self.print_log('Test passed: ' + str(testPassed))
self.print_log('Return string: ' + returnString)
ret = [self.testPath, self.deviceName, returnString, testPassed]
set_return( ret)
def print_pio(self):
print 'piopio'