Remote blacs worker / IntermediateDevice examples

50 views
Skip to first unread message

Edvinas Gvozdiovas

unread,
Apr 28, 2025, 11:22:11 AMApr 28
to the labscript suite
Hi All,

I have two PCs:
(1) blacs computer,
(2) remote PC visible via network.

PC (2) is connected to a hardware device which PC (1) cannot see. Currently, we manually run a script on PC (2) to do what we want with the hardware device, then we unpause blacs and let the experiment run. There is nothing that needs to be done to the device during the experiment, so there is no sense of timings and clock sync. Now we want to control the script on PC (2) using PC (1) via blacs such that it could read global values from each shot allowing us to implement logic based on global values just before a shot begins running.

I can see myself using either function runner or IntermediateDevice to achieve my goal. I would prefer extreme simplicity for now.

Because I do not understand how this is done "correctly", I want to start with something simple. Let's pretend PC (2) has a barebones python script running continuously waiting for commands. Using PC (1), when a shot enters the transition to buffered stage, I want blacs to send a string "hello" to PC (2), have it read the string and save str("hello" + "world") somewhere to the .h5 file of the currently running shot.

Is there a minimal example of this sort of flavor I could get started with? My confusion arises with not understanding what code, classes and infrastructure needs to be added to the blacs computer, and what needs to be done on the remote computer end, to get this to work.

dihm....@gmail.com

unread,
Apr 29, 2025, 4:09:41 PMApr 29
to the labscript suite
This may not be as hard as you thought, since labscript has a concept of remote BLACS instances (ie you can have more than one BLACS computer in an experiment). I personally haven't used this feature, but an example connection table is in the labscript_utils repo (https://github.com/labscript-suite/labscript-utils/blob/master/labscript_profile/default_profile/userlib/labscriptlib/example_apparatus/connection_table_IMAQdx_remote.py). Hopefully that is enough to point you in the right direction for how to run some devices on a remote BLACS instance (which sounds like it would satisfy your need, assuming you don't mind creating a proper labscript device for your widget).

-David

Reply all
Reply to author
Forward
0 new messages