Script execution

This commit is contained in:
gac-x03da
2019-02-08 15:47:25 +01:00
parent e78bb09c63
commit 321597f3f2
+8 -5
View File
@@ -16,10 +16,11 @@ RELATIVE = False
# do not edit below
OtfRunChannel = Channel("X03DA-OTF:RUN", type="b")
OtfRunChannel = Channel("X03DA-OTF:RUN", type="i")
OtfEnergyChannel = Channel("X03DA-OTF:EDATA", type="[d", size=2000)
OtfCh1Channel = Channel("X03DA-OTF:IDATA1", type="[d", size=2000)
OtfCh2Channel = Channel("X03DA-OTF:IDATA2", type="[d", size=2000)
OtfMsgChannel = Channel("X03DA-OTF:MSG", type="s")
#MOTOR = (ManipulatorTheta)
MOTOR = (dummy)
@@ -28,11 +29,13 @@ SENSORS = (OtfCh1Channel, OtfCh2Channel, OtfEnergyChannel)
def trigger_otf():
wait_beam()
OtfRunChannel.put(True)
#wait_beam()
print("start otf")
OtfRunChannel.put(1)
time.sleep(10.)
OtfRunChannel.wait_for_value(False, 200)
print("waiting for otf")
OtfRunChannel.wait_for_value(0, 200)
print(OtfMsgChannel.get())
try:
lscan(MOTOR, SENSORS, STARTPOS, ENDPOS, STEPS, LATENCY, RELATIVE, before_read=trigger_otf, after_read = after_readout)