03-23-2016 12:06 PM
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.
Solved! Go to Solution.
03-23-2016 04:25 PM
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.
03-24-2016 07:55 AM
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.