This commit is contained in:
root
2018-09-27 13:50:54 +02:00
parent 571ead1c9e
commit 02cb40fb12
13 changed files with 285 additions and 114 deletions
+17 -3
View File
@@ -149,10 +149,10 @@ class WireScanner(WireScanInfo):
self.range = None
self.start = None
self.end = None
self.scan_range = scan_range;
self.scan_range = scan_range
if velocity is not None:
self.wire_velocity.write(float(velocity))
self.set_velocity(velocity)
if cycles is not None:
self.nb_cycles.write(int(cycles))
if continuous is not None:
@@ -165,7 +165,17 @@ class WireScanner(WireScanInfo):
#def on_readback_change(self, val):
# self.readback = val
def set_velocity(self, velocity):
self.wire_velocity.write(float(velocity))
self.velocity = self.wire_velocity.get()
def set_travel_velocity(self):
tv = self.travel_velocity.read()
self.set_velocity(tv/math.sqrt(2))
self.motor.speed=(tv)
def set_selection(self, sel):
if not sel in WireScanner.Selection:
raise Exception("Invalid Wire Scan selection: " + str(sel))
@@ -183,6 +193,10 @@ class WireScanner(WireScanInfo):
if sel in ["W1Y", "W2Y"]: self.start.write(float(self.scan_range[2]))
if sel in ["W1X", "W2X"]: self.end.write(float(self.scan_range[1]))
if sel in ["W1Y", "W2Y"]: self.end.write(float(self.scan_range[3]))
print "Sel: ", sel
print "Range: ", self.scan_range
print "Scan start: ", self.start.read()
print "End start: ", self.end.read()
def abort(self):