From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Triggered single sample from buffer for Digital Output

Solved!
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.

Best,

Marco.

0 Kudos
Message 1 of 4
(1,088 Views)

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.

0 Kudos
Message 2 of 4
(1,079 Views)
Solution
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

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).
Message 3 of 4
(1,067 Views)

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

Thank you!

Marco.

0 Kudos
Message 4 of 4
(1,061 Views)