LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous output to DAQmx and software queue

Solved!
Go to solution

Hi,

 

I am trying to output a digital waveform on a DAQ card using the internal clock. Now, I would like to also store the waveform for further processing using the accurate times at which the waveform was written. So I would like to get a waveform back which allows me to know in which state my digital output was at a given time.

 

Is there an option to do this?

Or, as an alternative, could I somehow synchronise the start of the waveform output to the DAQ card with a timed loop? Since I know the waveform that is written, that loop could e.g. return that waveform with the proper 't0' for each iteration.

 

The code is running on an RT-target.

 

Background: I am controlling an instrument which has no readout of its current state but I would like to record its current state based on the control input.

0 Kudos
Message 1 of 3
(3,009 Views)

Maybe you can use "start trigger VI" for starting your task in the given moment?
And then you know moment of start (t0) and dt from task timing.

0 Kudos
Message 2 of 3
(2,977 Views)
Solution
Accepted by topic author ehrlich

After some more digging, I realized that there is a "DAQmx Create Timing Source" VI that returns a timing source synchronized to the Sample Clock of the DAQmx task. This timing source can be used as a timing source for a timed loop. There is an example for that here:

https://decibel.ni.com/content/docs/DOC-25763

 

Unfortunately, I realized that my digital I/O hardware has no hardware timing capabilities so this also doesn't work for me and I have to stick to a software timed solution.

0 Kudos
Message 3 of 3
(2,938 Views)