Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

Triggered single sample from buffer for Digital Output

Go to solution

Dear all,


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.



0 Kudos
Message 1 of 4

I'm really sorry but after few minutes I found the solution to my question here:


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.

0 Kudos
Message 2 of 4
Accepted by topic author bruniii

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.



-Kevin P

Message 3 of 4

Yes, this is indeed what I'm doing after founding that the clock source can be my external clock.

Thank you!


0 Kudos
Message 4 of 4