Using PC onboard clock as pseudoclock

38 views
Skip to first unread message

Justin He

unread,
May 24, 2023, 7:47:00 PM5/24/23
to the labscript suite
Hello everyone.

I am very new to labscript and programming experiments in general, so my question is admittedly simple. I'm currently working on an experiment that does not require a high degree of precision, and so for the sake of simplicity wanted to use my personal computer's onboard clock as the "pseudoclock" for the experiment. Do any of you have advice or tips on how to do this, if it is possible? Would I have to create a new "device" for this purpose?

Thank you in advance.

Philip Starkey

unread,
May 24, 2023, 10:32:08 PM5/24/23
to labscri...@googlegroups.com
Hi Justin,

This might depend on what other devices you want to use. In theory you could write a new pseudoclock device if your computer had a GPIO you could use to generate the digital signal to send to your other devices. Most PCs don't have these though. Can you share more details on the other hardware you want to control with labscript?

Personally, I wouldn't think it was worth the effort given you can make a PrawnBlaster pseudoclock using the $5 Raspberry Pi Pico microcontroller and the free firmware we have on GitHub. Your time is almost certainly worth more than $5!

Cheers
Phil
--
Philip Starkey

--
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/96bcea03-cf9b-43b0-bf73-74046010846bn%40googlegroups.com.

Justin He

unread,
May 25, 2023, 2:50:37 PM5/25/23
to the labscript suite
I apologise if this is a double post, but I inadvertently sent my follow up in a private response and am not sure if it properly sent.

Thank you Dr. Phillip!

I appreciate your quick response and will be sure to follow your advice of using a Raspberry Pi Pico. If you don't mind, may I ask a very quick and simple follow up question?

I have recently found out that my NI DAQ is unfortunately not compatible with external sample clocks. I have a USB-6002, and this would certainly explain some errors I was getting within BLACs.  Will I still be able to control it with labscript? Or will I need to obtain a different DAQ in order to use the labscript library?
Screenshot 2023-05-25 114831.png
Thank you so much for your consideration.

Justin. 

dihm....@gmail.com

unread,
May 25, 2023, 4:10:44 PM5/25/23
to the labscript suite
Justin,

I've also made this mistake before. The cheapest DAQ that works (last I checked) was the USB-6211. In any case, you can actually use the 6002, just not for any buffered outputs (ie static voltages only).

-David

Justin He

unread,
May 25, 2023, 4:11:38 PM5/25/23
to the labscript suite
Thanks David. I appreciate the response!

Justin He

unread,
May 25, 2023, 5:07:40 PM5/25/23
to the labscript suite
Hi David.

I apologize for keeping this thread alive so long. I went back in and ran the get_capabilities.py script with the USB 6002 and was surprised to see that supports_buffered_AO was automatically ticked as True, in contrast to the response above. Is this in error? I would like to be sure I am unable to use this before purchasing anything else.

Thank you again.

Justin 

dihm....@gmail.com

unread,
May 26, 2023, 4:36:16 PM5/26/23
to the labscript suite
Justin,

I do believe this is an error. I vaguely recall looking in to that as I was surprised by that too. The issue is that these cheaper devices do nominally support buffered outputs, just not the specific type of buffered outputs labscript uses. I thought I may have updated the script to catch that edge case, but it would seem I didn't actually get around to it. If you felt so inclined, opening a github issue at https://github.com/labscript-suite/labscript-devices would be helpful.

-David

Reply all
Reply to author
Forward
0 new messages