From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-25-2022 04:47 AM
Hello,
Target: I would like to synchronize (with a litle delay) my acquisition with an output signal I am generating.
Set up: cDAQ 9174 with NI-9401 used for output and NI 9219 used for aquisitions.
Current vi is shown below:
I use a CO freq impulsion to generate the square signal, whose the main input is the frequency but as you can see, the acquisitions are not synchronized with it.
Is there a way to do that ?
Thank you in advance,
02-25-2022 12:18 PM
The 9219 is a Delta-Sigma device that doesn't support the direct use of an external signal as a sample clock. It must generate it's own sample clock from a high-speed timebase.
So the *simple* version of the answer is no, you can't really sync up your 9219 sampling with your CO pulses. Not directly.
Many delta-sigma devices *do* support the ability to derive their sample clocks from an externally-supplied timebase, but there will typically be a narrow range of allowed timebase frequencies. The 9219 spec sheet doesn't quite declare itself one way or another about such support, but my educated guess from the verbiage I *do* see is that it doesn't support it. So that looks like a no too.
Yet another option can be to use additional chassis counters to export the AI sample clock and observe / measure it with another counter task. Maybe the AI task should be triggered off your CO task to provide a nice reference for t0. I'd then set up a 2-edge separation measurement on another counter to measure the time from the triggering edge to the first AI sample clock. That will at least let you know the timing offset between CO and AI so you can potentially adjust in post-processing.
-Kevin P
02-28-2022 02:54 AM
Hi Kevin_Price, thank you for your reply.
To be sure to understand your proposal, let me reformulate:
The idea is to measure the output (square frequency controled) signal with another AI channel to know the time base to kind of programmatically synchronize my acquisition with it ?
02-28-2022 05:17 AM
No, that wasn't what I meant. My idea was to add in a 2nd counter task that would measure the time offset from your first generated CO pulse until the first AI sample clock signal from your 9219 device. That first CO pulse would also be used to trigger the AI task.
Due to having a delta-sigma style converter, there will be some delay from when the AI task gets triggered until the first sample is taken. Since you won't be able to force it to 0, this at least lets you measure it.
-Kevin P