08-09-2021 10:23 AM
Hi Everyone,
I have an application where we have expanded the IO capabilities of a cRIO 9049 by attaching a cDAQ 9189 with AI modules. Originally we hoped TSN would suffice for the synchronization of these devices but there is no known way to propagate an FPGA based GPS PPS clock to the TSN grandmaster (also interested in how to do this if you have any info). To side step the TSN, I would like to use the PFI inputs on the cDAQ to trigger 5000 samples at 5000 S/s. Is there a way to drive the PFI output on the cRIO within the FPGA? How within DAQmx do I trigger 5000 samples at 5000 S/s when a trigger is received from the cDAQ PFI?
Is there a better way to do this to ensure I know the t0 of the cDAQ AI waveform is synchronized with a FPGA timekeeper time?
Basic process overview:
FPGA-
-Run GPS PPS FPGA Timekeeper package
-Every 1 second trigger PFI on cRIO
cDAQ-
-init task to collect 5000 samples at 5000 S/s when trigger is recieved from PFI
-from cRIO, run DAQmx read to read all the data in buffer
Additional question:
If I have multiple cDAQs attached, can I put the PFI's in parallel so both are triggered at the same time?
Thanks in advance!
Solved! Go to Solution.
08-09-2021 10:47 AM - edited 08-09-2021 10:56 AM
On the FPGA, you can use the chassis triggers (Numbers 0-3 are FPGA->RT) to output a digital pulse.
You can then use DAQmx Connect Terminals to connect trig0 (or whichever) to PFI0 and then output it via the SMB port.
There's an article here that describes the inverse process: Using PFI0 in the FPGA of the CompactRIO With DAQmx
For the reading on cDAQ, I'm less sure, but sounds like you need a retriggerable finite samples acquisition with a hardware timed sample clock, which should be doable.
Depending on how the two devices are connected and how you're controlling the cDAQ, I think this should be similar to controlling a DAQmx device from a desktop PC (and there's many more topics here discussing that).