Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

user_device command at specific time

35 views
Skip to first unread message

David La Mantia

unread,
Sep 14, 2024, 7:13:12 PM9/14/24
to the labscript suite
I have written several user_devices, but I'm having a hard time implementing timing.  

For example, I have a Rigol AWG ('AWG1') and have successfully implemented functions such as AWG1.set_freq(channel, freq)

what I'd really like is to pass the time variable 't' in my experimental script such that when I call AWG1.set_freq(t, channel, freq)
those set of SCPI commands are sent to the device at time t.  In this way I could step the frequency every 1s, for example.

For reference, a pulseblaster is my pseudoclock and flag0 is my clockline.

Thank you for any help.

Cheers,
Dave

Jan Deppe

unread,
Sep 15, 2024, 4:08:18 PM9/15/24
to the labscript suite
Hey Dave,
Labscript can´t send specific commands at a specific clock cycle during a shot. All devices receive their commands prior to starting the shot. The Masterclock then receives a command that the shot is started. So you would need to trigger the AWG. Maybe that model is triggerable ?
Otherwise, depending on the precision of the timing you could send set a Arduino or some other device which is triggerable in between the AWG and the clock and this devices sends the commands after receiving a trigger.
Maybe these links can help you:


greetings,
Jan

David La Mantia

unread,
Sep 15, 2024, 5:35:58 PM9/15/24
to the labscript suite
ok, thank you for the help and the resources.

Best,
Dave
Reply all
Reply to author
Forward
0 new messages