Programming pseudoclock with PXIe6738 counter

45 views
Skip to first unread message

Gabriele Gatta

unread,
Jan 30, 2024, 9:18:57 AMJan 30
to the labscript suite
Hi all, 

I'm implementing a pseudoclock device to manage two PXIe-6738 AO  and a PXIe-6535 DO into a PXIe-1073 Chassis. Instead of using an external pseudoclock device I'm wondering if exist a way to program one of the NI boards to generate the pseudoclock signal for the experiment sequences, and share it with the other boards. 

The idea is to talk with the internal counters of the 6738 boards, and as explained here https://www.ni.com/docs/en-US/bundle/daqhelp/page/gensnglefinconttrains.html generate the necessary pulse train sequence for the shot experiment. The "Counter (buffered) - Continuous Output.vi" LabView example seems to be the most promising program to do this, I tried it and it works. Since the NI_DAQmx Pyhton interface is the same of LabView or C, should not be difficult to find the right Python functions.
In the NIDAQmx header file there are these functions talking with the counter, maybe they are:
DAQmxWriteCtrTime
DAQmxWriteCtrTimeScalar
DAQmxWriteCtrTicks
DAQmxWriteCtrTicksScalar

Has anyone done this? Can be in your opinion a feasible solution?

Thanks in advance 
Gabriele

dihm....@gmail.com

unread,
Feb 13, 2024, 8:09:58 PMFeb 13
to the labscript suite
This type of question comes up fairly often. As far as I know, nobody has done it. Programming a pseudoclock is actually a bit tricky in labscript and I suspect most decide against it in the end. A large contributing factor is that standard digital outputs of NI DAQs are often limited to 10MHz, which can be quite limiting for pseudoclocks. Honestly, if all of your experimental hardware is NI anyway, you could consider programming everything as one large Task. That's outside the usual labscript paradigm but it would work. Our more typical recommendation is to get some Raspberry Pi Picos and use a Prawnblaster as your pseudoclock. The specs are very competitive and the Pico is only $5 and easy to find.

Hope that is helpful,
-David

Gabriele Gatta

unread,
Feb 14, 2024, 4:58:57 AMFeb 14
to labscri...@googlegroups.com
Hi David, thank you for the answer. 

Actually me and a colleague of mine did it. We programmed two counters on two PFI outputs of one analog board to create two indipendent pseudoclock for the analog and digital channels, obtaining in this way two indipendent master clocklines for the two boards. In this way the digital channels are not limited to the analog resolution of 1MHz but as you said they activate with an output sample rate of 10MHz. Currently we do not prospect of making measurements with a higher temporal resolution than this, anyway at the need for better resolution, we will go for sure for an external pseudoclock as you suggest.
We easily succeded to start trigger the pseudoclocks to another PFI outputs and simultaneously provide a more precise external reference clock eventually.

LabView examples for the continous generation of buffered pulse train with programmable frequency and duty cycle was very useful. Modifying it implementing the trigger mode we translated it to Python thanks to the NIDAQmx library. We had
the signal generated at a DummyPseudoclock reading the times from the HDF file. The only issue is to provide a synchronization between the DummyPseudoclock and the NIDAQ boards since in this case two blacs workers will be talking to the same PXIe6738 card at the same time.

Gabriele




--
You received this message because you are subscribed to a topic in the Google Groups "the labscript suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/labscriptsuite/_6vRIdO9Dk4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to labscriptsuit...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/labscriptsuite/4e9fba52-6d0c-457c-b7e1-ad6d12c201a5n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages