NI Home
Cart Cart | Help
Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Currently Being Moderated

(DAC Tester) Correlated Digital Output using Counter with additional Delayed Pulse

VERSION 1

Created on: May 3, 2009 9:33 AM by Dr.Doiron - Last Modified:  May 3, 2009 9:51 AM by Dr.Doiron

 

Functional Description

This VI uses Correlated Digital Output to send out a ramp and sine 16-bit digital waveform for the purposes of testing Digital to Analog Converters. It can be modified to output N-bit waveforms to test any DAC (if he DAQ card supports that number of correlated digital lines). This VI also has a very important "Strobe" signal feature. This is a user-adjustable delayed pulse which indicates to the DAC that data is ready.

 

 

DAC Tester.jpg

 

Steps:
1. Create a Digital Output Channel and a Counter Output channel to produce a Pulse in terms of Frequency.
2. Call the DAQmx (Sample Clock) VI which sets the sample clock rate for the digital output task. Additionally, set the sample mode to continuous. Note that the sample clock is the pulse generated by the counter output (routed internally).
2a.  Call the Get Terminal Name with Device Prefix VI.  This will take a Task and a terminal and create a properly formatted device + terminal name to use as the source of the digital sample clock.  The terminal used is Counter N's Internal Output.  The Match Pattern VI is used to determine which counter was specified.
3. Write the waveform to the output buffer. This example creates a waveform with a specified number of channels of Ramp and Sine.
4. Create a Counter Output channel with an initial delay to act as a "Strobe" signal which indicates data is ready.
5. Configure a Start Trigger so that the Strobe signal will happen "Strobe Delay" seconds after each data output.
6. Start the Strobe Output and Digital Output. Note that since the Stobe Output is set to trigger on the Counter's Internal Output it will wait on the counter. Additionally, the Digital Output will be started but will not output data until the counter begins because the counter is the sample clock (the DAQ card will only output or input on it's sample clock).
7. Call Is Task Done to check for errors in the digital output and counter tasks.
8. Call the Clear Task VI to clear each task and use the popup dialog box to display an error or warning if any.

 

Average User Rating
(1 rating)




Hueter Hueter  says:

Awesome Example!

More Like This

  • Retrieving data ...