indefinite waits until retriggers with PrawnBlaster

31 views
Skip to first unread message

Ivan Herrera

unread,
Apr 29, 2024, 7:21:57 AMApr 29
to the labscript suite
Hi,

Implementing Labscript at the Atom Trap Trace Analysis at the University of Adelaide.
Our system doesn't require precision timing but some of our procedures will take several minutes or even hours, and iterate over it. As a 1st approach, we try to include waits, using Prawnblaster, during these long steps. In the Prawnblaste-GitHub is written that "Support for indefinite waits until retrigger"

At the moment I cannot see how to implement these indefinite triggers.
Tried to increase the timeout, but it is capped to ~43 secs, but no errors.
Tried to disable the wait monitor; "use_wait_monitor=False". But this raises an error during compilation.

Has anyone implemented an indefinite wait?

Cheers
Ivan HB




dihm....@gmail.com

unread,
Apr 30, 2024, 2:01:04 PMApr 30
to the labscript suite
Ivan,

While the prawnblaster firmware supports general indefinite waits, the labscript driver for it doesn't. The primary reason for that is because labscript needs to know the wait duration in order to stitch together analog input information (from NI-DAQs in particular) with the timing events of the experiment. Indefinite waits basically make that generalized process impossible. Modifying labscript to handle it smoothly may be a complex endeavor.

Ignoring the labscript implementation for a moment, what will probably work best is being able to separate all of your experiment hardware into two categories: asynchronous, slow initialization; and stuff that happens synchronously after your trigger. If you can do that, you could use two separate prawnblasters, one for each category. Then you can start the second PB with an indefinite wait using the `hwstart` command. You may be able to fudge in indefinite waits mid-script with a single device, but you would need to find some way to gracefully handle the lack of timing for the wait, which requires mucking around in the labscript internals.

What that could look like depends a lot on exactly what you need. If you are lucky and the initialization doesn't require meaningful timing, you could program your script with a logical offset. IE put all your synchronous stuff at the start, then all your initialization at the end. So running a script means you wait for a trigger for what you care about (waiting minutes to hours) then initialize for another run at the end (then your indefinite wait occurs between runs). All you would need to do is modify the labscript code to use `hwstart` instead of `start` on the prawnblaster (probably, devil is in the details).

Hopefully that is helpful. Happy to discuss more details.
-David

Ivan Herrera

unread,
Apr 30, 2024, 9:55:18 PMApr 30
to the labscript suite
Hi David,

Thanks for the fast response. To summarise your comments.

Prawnblaster can't do indefinite waits in labscript and modifications to achieve this are complex. 
Understand.

Separation of hardware into 2 categories, sync and async. 
This can be done, It is the actual scheme, but in between we have some elements that depend on Labscript timed hardware between the sync and async blocs.

Split the different stages of the run into different runs, with a physical trigger to start them. And do the async stuff at the end of them.
That's very helpful, I'll try this path.

Let me know if I incorrectly interpreted your comments.

Thanks again
Ivan 

Reply all
Reply to author
Forward
0 new messages