Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

acquisition synchronization with pulse generation

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.

 

 

TeraEngineer_0-1645785961878.png

Is there a way to do that ?

 

Thank you in advance,

 

0 Kudos
Message 1 of 4
(806 Views)

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 4
(778 Views)

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 ?

 

0 Kudos
Message 3 of 4
(751 Views)

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 4 of 4
(746 Views)