automatic waiting period, with newRun_NNDy.py
integrated with newRun_NNDy.py that is run by lyse and handles the halting of the execution of the script while the shot is running
This commit is contained in:
parent
a55b7ab401
commit
a9fd8cebed
@ -1,8 +1,10 @@
|
|||||||
#this file runs the experiment through runmanager
|
#this file runs the experiment through runmanager
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from os import listdir
|
from os import listdir
|
||||||
|
import zmq
|
||||||
|
|
||||||
#import for labscript
|
#import for labscript
|
||||||
from labscript.labscript import labscript_init
|
from labscript.labscript import labscript_init
|
||||||
@ -32,13 +34,22 @@ def run_experiment(routine_name, global_var):
|
|||||||
hdf_path = runmanager_client.get_shot_output_folder()
|
hdf_path = runmanager_client.get_shot_output_folder()
|
||||||
|
|
||||||
|
|
||||||
print(f'engaged, now waiting')
|
|
||||||
runmanager_client.engage()
|
runmanager_client.engage()
|
||||||
#print('engaged')
|
#print('engaged')
|
||||||
|
print(f'engaged, now waiting')
|
||||||
|
|
||||||
#NNDy_ will make sure that the script is put on hold until the shot isn't sent to lyse
|
#newRun_NNDy.py will make sure that the script is put on hold until the shot isn't sent to lyse
|
||||||
#ask Jianshun for further info
|
#ask Jianshun for further info
|
||||||
|
|
||||||
|
url = "tcp://" + str("127.0.0.1") + ":" + str(24325)
|
||||||
|
context = zmq.Context.instance()
|
||||||
|
server = context.socket(zmq.REP)
|
||||||
|
server.bind(url)
|
||||||
|
msg = server.recv_json()
|
||||||
|
server.send_json(True)
|
||||||
|
server.unbind(url)
|
||||||
|
server.close()
|
||||||
|
|
||||||
|
|
||||||
print('waiting time is over')
|
print('waiting time is over')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user