From a9fd8cebedb4d459e01578191129e56314d308a7 Mon Sep 17 00:00:00 2001 From: castaneda Date: Fri, 21 Mar 2025 15:53:14 +0100 Subject: [PATCH] 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 --- scripts/runmanager_remote.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/runmanager_remote.py b/scripts/runmanager_remote.py index 94b57d1..06d7426 100644 --- a/scripts/runmanager_remote.py +++ b/scripts/runmanager_remote.py @@ -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')