Conditional retaining of analog/digital channel states between shots

36 views
Skip to first unread message

Rohit Prasad Bhatt

unread,
Jun 14, 2024, 4:55:53 AMJun 14
to 'Philip Starkey' via The labscript suite
Dear all,
Maybe this is trivial. Is there a way in labscript to keep the state of some specific digital or analog channels constant from the end of a shot to beginning of a new shot?

We want to start MOT loading for the next shot at the end of the current shot by setting appropriate values in our digital/analog channels. This way we could use the time for transition to buffered/manual for MOT loading. But when the next shot runs it should not reset those channels. We also have to think what happens in the last shot (because we do not want to leave current running in the coils forever) and for this we already have a way to count how many shots are remaining in BLACS queue.

So the question is how can we tell labcsript to not change/reset anything for some specific channels at the beginning of the shot (based on some conditional check) because the previous shot already set those channels. Of course we still want control over these channels during the rest of the sequence.

Regards,
Rohit Prasad Bhatt

Philip Starkey

unread,
Jun 15, 2024, 10:54:46 AMJun 15
to the labscript suite
Some sort of just-in-time compilation for labscript has been discussed in the past, but nothing eventuated. Most solutions slow down the cycle time and end up with tight coupling between runmanager and BLACS, which we generally try to avoid.

Something I have done before is have a shared set of globals and experiment logic that is used across all experiment logic Python files. Runmanager can have multiple globals files loaded/open for the one experiment without issue. This shared globals/code would perform your MOT initialisation at both the start and end of the experiment. That way, regardless of what experiment is next, it's assumed that the previous one left the MOT in the expected state. BLACS should preserve the channel state between the end of a shot and the start of the next. If you aren't seeing that, then either there is a bug in BLACS, a bug in the labscript_device code, or a bug in your experiment logic. It definitely used to be possible to start the MOT loading at the end of the previous experiment provided the next shot had access to the shared globals. You just have to ensure the final value of the channel(s) of the first shot match the starting values at the start of the next shot.

Let me know if that's of any use to you!

Cheers,
Phil

Rohit Prasad Bhatt

unread,
Jun 18, 2024, 2:37:20 PMJun 18
to 'Philip Starkey' via The labscript suite
Hi Phil,
Thanks for the clarification. Yes we have implemented it and it works as expected.

Regards,
Rohit Prasad Bhatt

--
You received this message because you are subscribed to the Google Groups "the labscript suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to labscriptsuit...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/labscriptsuite/a2644c3c-4804-4dc3-a9eb-1053f8b109ffn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages