Hello labscript community,
I am working since the last month to implement the experiment control of our new group in Vienna. We want to use an ADwin, which has both internal clocks and programmable output/input modules. I wrote the code for the new device and am so far very happy how it works in labscript. If someone is interested, I can share my implementation of the ADwin when I'm done.
There is just one point where I'm worried right now, which is the time it takes BLACS to execute a shot. Right now the ADwin is the only device connected to BLACS and the execution time from one shot to the next one queued up is about 700 ms. I tested with a python script that the bare time to send the output/input data between PC and hardware and shot execution is below 100 ms. In the BLACS log file I've seen that the time after one worker function is finished and the next one started is about 100 ms. For example here it takes 150ms from the signal that transition_to_buffered is finished to start_run (the Master Pseudoclock is the same and only device):
2022-10-12 15:42:51,230 DEBUG BLACS.ADwin_main_worker.worker: ADwin called transition_to_buffered.
2022-10-12 15:42:51,233 DEBUG BLACS.ADwin.mainloop: Waiting for worker to acknowledge job request
2022-10-12 15:42:51,233 DEBUG BLACS.ADwin.mainloop: Worker reported job started, waiting for completion
2022-10-12 15:42:51,243 DEBUG BLACS.ADwin_main_worker.worker: Job complete
2022-10-12 15:42:51,243 DEBUG BLACS.ADwin_main_worker.worker: Waiting for next job request
2022-10-12 15:42:51,243 DEBUG BLACS.ADwin.mainloop: Job completed
2022-10-12 15:42:51,243 DEBUG BLACS.ADwin.mainloop: returning worker results to function _transition_to_buffered
2022-10-12 15:42:51,324 DEBUG BLACS.ADwin.mainloop: Finalising function
2022-10-12 15:42:51,324 DEBUG BLACS.queue_manager.thread: ADwin finished transitioning to buffered mode
2022-10-12 15:42:51,339 DEBUG BLACS.ADwin.mainloop: Waiting for next event
2022-10-12 15:42:51,339 DEBUG BLACS.queue_manager.thread: About to start the master pseudoclock
2022-10-12 15:42:51,339 DEBUG BLACS.ADwin.state_queue: requesting next item in queue with mode 8
2022-10-12 15:42:51,339 DEBUG BLACS.ADwin.state_queue: New state queued up. Allowed modes: 8, queue state indefinitely: True, delete stale states: False, function: _start_run
2022-10-12 15:42:51,339 DEBUG BLACS.ADwin.state_queue: Current items in the state queue: [[0, 1214, 8, True, False, [<function ADwinProIITab.start_run at 0x000001B7A95723A0>, [(<queue.Queue object at 0x000001B7A9624DC0>,), {}]]]]
2022-10-12 15:42:51,339 DEBUG BLACS.ADwin.state_queue: Current items in the state queue: [[0, 1214, 8, True, False, [<function ADwinProIITab.start_run at 0x000001B7A95723A0>, [(<queue.Queue object at 0x000001B7A9624DC0>,), {}]]]]
2022-10-12 15:42:51,408 DEBUG BLACS.ADwin.state_queue: Re-initialsing self._get_blocking_queue
2022-10-12 15:42:51,408 DEBUG BLACS.ADwin.state_queue: iterating over states in queue
2022-10-12 15:42:51,408 DEBUG BLACS.ADwin.state_queue: requested state found in queue
2022-10-12 15:42:51,408 DEBUG BLACS.ADwin.mainloop: Processing event _start_run
Now I'm not sure if this time difference of caused by my implementation of the BLACS Tab/Worker, or if this is internal overhead of the BLACS experiment queue.
Can someone using labscript for longer tell me how large the shot execution time in BLACS is, compared to the bare time for hardware communication?
If you could send me the BLACS log output from one shot, that would also help me a lot.
Best wishes,
Johannes