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:
castaneda 2025-03-21 15:53:14 +01:00
parent a55b7ab401
commit a9fd8cebed

View File

@ -1,8 +1,10 @@
#this file runs the experiment through runmanager
from datetime import datetime
import time
from os import listdir
import zmq
#import for labscript
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()
print(f'engaged, now waiting')
runmanager_client.engage()
#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
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')