This commit is contained in:
gac-S_Changer
2018-09-26 16:49:28 +02:00
parent ea1b2bad2a
commit e59582ad02
9 changed files with 36 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
#Thu Sep 20 09:25:00 CEST 2018
#Mon Sep 24 16:01:28 CEST 2018
maxValue=1.0
minValue=0.0
offset=0.0

View File

@@ -1,4 +1,4 @@
#Thu Sep 20 09:25:00 CEST 2018
#Mon Sep 24 16:01:28 CEST 2018
maxValue=1.0
minValue=0.0
offset=0.0

View File

@@ -1,4 +1,4 @@
#Thu Sep 20 09:25:00 CEST 2018
#Mon Sep 24 16:01:28 CEST 2018
maxValue=1.0
minValue=0.0
offset=0.0

Binary file not shown.

View File

@@ -141,8 +141,8 @@
<Table columnCount="6" rowCount="30">
<Column editable="false" title="Puck" type="java.lang.String"/>
<Column editable="false" title="Online" type="java.lang.Boolean"/>
<Column editable="false" title="Mechanical" type="java.lang.Boolean"/>
<Column editable="false" title="Inductive" type="java.lang.Boolean"/>
<Column editable="false" title="Mechanical" type="java.lang.String"/>
<Column editable="false" title="Inductive" type="java.lang.String"/>
<Column editable="false" title="Detection" type="java.lang.String"/>
<Column editable="false" title="Image" type="java.lang.String"/>
</Table>

View File

@@ -1,6 +1,7 @@
import ch.psi.mxsc.Puck;
import ch.psi.mxsc.PuckDetection;
import ch.psi.mxsc.PuckState;
import ch.psi.mxsc.PuckState.SwitchState;
import ch.psi.pshell.core.Context;
import ch.psi.pshell.swing.DevicePanel;
import ch.psi.utils.swing.SwingUtils;
@@ -36,8 +37,8 @@ public class PuckDetectionPanel extends DevicePanel {
int id = puck.getIndex() + 1;
PuckState state = getDevice().getPuckState(id);
table.getModel().setValueAt(state.online, row, 1);
table.getModel().setValueAt(state.mecSwitch, row, 2);
table.getModel().setValueAt(state.indSwitch, row, 3);
table.getModel().setValueAt((SwitchState.Off == state.mecSwitch) ? "" : String.valueOf(state.mecSwitch), row, 2);
table.getModel().setValueAt((SwitchState.Off == state.indSwitch) ? "" : String.valueOf(state.indSwitch), row, 3);
table.getModel().setValueAt(puck.getDetection() == null ? "" : puck.getDetection(), row, 4);
table.getModel().setValueAt(puck.getPuckType() == null ? "" : puck.getPuckType(), row, 5);
} catch (Exception ex) {
@@ -169,7 +170,7 @@ public class PuckDetectionPanel extends DevicePanel {
}
) {
Class[] types = new Class [] {
java.lang.String.class, java.lang.Boolean.class, java.lang.Boolean.class, java.lang.Boolean.class, java.lang.String.class, java.lang.String.class
java.lang.String.class, java.lang.Boolean.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
};
boolean[] canEdit = new boolean [] {
false, false, false, false, false, false

View File

@@ -55,12 +55,14 @@ class RobotSC(RobotTCP):
self.assert_dewar()
def put_gonio(self):
self.start_task('putGonio')
pin_offset = get_pin_offset()
self.start_task('putGonio', pin_offset)
self.wait_task_finished(TASK_WAIT_ROBOT_POLLING)
self.assert_gonio()
def get_gonio(self):
self.start_task('getGonio')
pin_offset = get_pin_offset()
self.start_task('getGonio', pin_offset)
self.wait_task_finished(TASK_WAIT_ROBOT_POLLING)
self.assert_gonio()

View File

@@ -238,6 +238,25 @@ def is_puck_loading():
feedback_psys_safety.take() == False and \
not guiding_tool_park.read()
def set_pin_offset(val):
if abs(val) >5:
raise Exception("Invlid pin offset: " + str(val))
try:
set_setting("pin_offset",float(val))
except:
log("Error setting pin offset: " + str(sys.exc_info()[1]), False)
def get_pin_offset():
try:
ret = float(get_setting("pin_offset"))
if abs(ret) >5:
raise Exception("Invlid configured pin offset: " + str(ret))
return ret
except:
log("Error getting pin offset: " + str(sys.exc_info()[1]), False)
return 0.0
update()
add_device(Controller.getInstance().basePlate, True)

View File

@@ -6,7 +6,7 @@ test_sample_data = [ \
{ "userName": USER_NAME, \
"dewarName": DEWAR_NAME, \
"puckName": "Isabelle Chip", \
"puckBarcode": "PuckWithChips", \
"puckBarcode": "CA00CF1471", \
"puckType": "unipuck", \
"puckAddress": "",\
"sampleName": "flat_Base_Pin_1", \
@@ -18,7 +18,7 @@ test_sample_data = [ \
{ "userName": USER_NAME, \
"dewarName": DEWAR_NAME, \
"puckName": "Isabelle Chip", \
"puckBarcode": "PuckWithChips", \
"puckBarcode": "CA00CF1471", \
"puckType": "unipuck", \
"puckAddress": "",\
"sampleName": "flat_Base_Pin_2", \
@@ -30,7 +30,7 @@ test_sample_data = [ \
{ "userName": USER_NAME, \
"dewarName": DEWAR_NAME, \
"puckName": "Isabelle Chip", \
"puckBarcode": "PuckWithChips", \
"puckBarcode": "CA00CF1471", \
"puckType": "unipuck", \
"puckAddress": "",\
"sampleName": "regular_Base_Pin_1", \
@@ -42,7 +42,7 @@ test_sample_data = [ \
{ "userName": USER_NAME, \
"dewarName": DEWAR_NAME, \
"puckName": "Isabelle Chip", \
"puckBarcode": "PuckWithChips", \
"puckBarcode": "CA00CF1471", \
"puckType": "unipuck", \
"puckAddress": "",\
"sampleName": "regular_Base_Pin_2", \