using a NI USB-6351 I would like to output a single sample from a previously uploaded buffer on the device memory when a rising edge of an external clock is detected on a second digital input, and to maintain this value until new rising edge is received or the task is stopped.
The clock could have non constant frequency hence the simple "trigger" to write all the buffer is not suited.
I have tried to use the option "Hardware Timed Single Loop" for the DAQmx Timing vi but it's an option not supported by the USB version of my board.
It looks like a very simple application but I wasn't able to find any example or suggestion.
Any help will be very appreciated.
Solved! Go to Solution.
I'm really sorry but after few minutes I found the solution to my question here: https://forums.ni.com/t5/Multifunction-DAQ/Output-samples-per-trigger-with-all-samples-preloaded/td-...
It's for the analog output but it's easy to do the same for a digital output.
Sorry about that, it was very simple indeed.
In my opinion, the linked method is still more complicated than you need.
In DAQmx terms, you should think of the signal as an "external sample clock" rather than as a trigger. That has the natural effect of causing one sample to be generated per pulse. When you configure DAQmx Timing, set the 'source' to be the terminal where this signal is connected. Set some reasonable value for the 'rate' as well, but if anything you should estimate high.
Yes, this is indeed what I'm doing after founding that the clock source can be my external clock.