Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

PseudoClock example

142 views
Skip to first unread message

jakob.r...@gmail.com

unread,
Nov 22, 2018, 4:13:32 AM11/22/18
to The labscript suite
Hi labscripters,

I'd like to test labscript for our experiments here in Paris. We don't have any Pineblaster or Pulseblaster available, but we do have another board that would be suitable (Viewpoint DIO-64, a PCI board with 64 digital outputs which are programmed with time-tagged bit patterns, with a max sustained rate of a few MHz). So I'm considering writing a PseudoClock class for that device. There is the "Adding a new device" document, which is great, but the commented code in Sec. 3.1 seems to be missing: the section starts "The following is an actual pseudoclock...commented here to explain what each bit is for". That's exactly what I would need, but I don't see the code in the document!
Can you help?

Thanks and greetings from Paris,
  Jakob

Philip Starkey

unread,
Nov 22, 2018, 7:26:27 PM11/22/18
to The labscript suite
Hi Jakob,

It's nice to hear you are interested in trying out the labscript suite!

I apologise for the state of our labscript documentation (we're working on better documentation but this doesn't help you right now!). Probably the best idea is for me to get you started with a rough example, and then you can post any follow up questions you have here. I would also encourage you to look at example.py as the Python object hierarchy has change a little since the documentation was last updated.

I've created a rough implementation for your device, and attached it to this message and it should be placed in the labscript_devices folder. It's heavily commented, and should hopefully explain everything. It was based on an amalgamation of the PulseBlaster and PineBlaster code in labscript_devices. It was a little complex due to the need to unwrap the internal pseudoclock representation (which labscript produces) into something for a device that does not support looping instructions, and also because I expect you would want to assign some outputs to clock other devices, and other outputs as direct DigitalOuts (which adds additional complexity due to the way labscript is structured). That said, it's wasn't impossible to do (and only slightly more complex than a PulseBlaster). The code is not tested, but should get you on the right track. Mainly you just need to add in a conversion to an appropriate data storage format in generate_code(), and save them in the HDF5 device group, and then write the BLACS classes to read these and program the device. The BLACS documentation should be more up to date, but I'd also encourage you to look over the PulseBlaster and PineBlaster code too.

Please let us know if anything doesn't make sense, we're happy to help out! If you do get the device working, feel free to make a pull-request to our project so it can be used by other people :)

Cheers,
Phil
ViewpointDIO64.py

Chris Billington

unread,
Nov 22, 2018, 7:37:35 PM11/22/18
to labscri...@googlegroups.com
Just a quick warning, I noticed the file attached in the previous email mixes spaces and tabs for indentation, which may cause subtle issues once edited or copy/pasted in an unlucky way.

I just ran a find-and-replace on it, here's a version with all spaces for indentation.

-Chris

--
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.
For more options, visit https://groups.google.com/d/optout.
ViewpointDIO64.py

jakob.r...@gmail.com

unread,
Nov 23, 2018, 3:13:13 AM11/23/18
to The labscript suite
Hi Phil and Chris,

wow, that's more than I hoped for, thank you so much!
Il have some fun with that code and will let you know if I get it worked out. (May take some time...)

Best wishes,
  Jakob

Harikesh Rao Ranganath

unread,
Feb 13, 2025, 11:06:00 AMFeb 13
to the labscript suite
Hi all,

I'm jumping into a conversation several years old but I'm in a similar situation. I have the same hardware and would like to test run it via labscript. I don't see this device on the labscript devices page, was the effort to incorporate it unsuccessful? I looked at the sample code and I don't know at the moment how to "convert instructions to appropriate format and save in HDF5 'group'". It wasn't obvious from a quick look at the DIO-64 user manual how I would do this though I will certainly have a closer look. Could you point me in the right direction? Apologies for the very layman question!

Thanks,
Harikesh

jakob.r...@gmail.com

unread,
Feb 13, 2025, 11:49:08 AMFeb 13
to the labscript suite
Hi Harikesh,

sorry I can't help - sadly, I didn't have time to pursue this.

Jakob

Harikesh Rao Ranganath

unread,
Feb 18, 2025, 10:46:58 AMFeb 18
to the labscript suite
Thanks Jakob.

Hi Phil and Chris,

Hope you're well! Wanted to bump this message again to get some guidance on implementing the Viewpoint DIO-64 via labscript. Once (hopefully) I can get it working would also love to contribute to the project. 

Best,
Harikesh

Reply all
Reply to author
Forward
0 new messages