Files
dev/script/test53.py
2018-01-19 10:56:53 +01:00

35 lines
751 B
Python
Executable File

caput("TESTIOC:TESTCALCOUT:Input", 2.0)
time.sleep(0.0)
caput("TESTIOC:TESTCALCOUT:Input", 5.0)
try:
#write_logs()
waiting = True
def plot_task():
global waiting
while waiting:
if count.take() != pos:
time.sleep(2.0)
ret = fork(plot_task)
try:
#Post-actions
wait_channel("TESTIOC:TESTCALCOUT:Output", "3.0", type = 's')
time.sleep(2.0)
print "Finished Energy scan"
finally:
waiting = False
join(ret)
#plot_file(newName)
print("Success")
except:
while caget('TESTIOC:TESTCALCOUT:Output') != 3.0:
print("Aborting...")
caput("TESTIOC:TESTCALCOUT:Input", 3.0)