Example Code

Digital Waveform FIFO Regeneration on M Series Devices

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Data Acquisition (DAQ)

    Software

  • LabVIEW

    Driver

  • NI DAQmx

Code and Documents

Attachment

Overview
The example shows how to set up the retransmit mode for Digital Waveform Generation in the M Series so it would behave the same as the FIFO regeneration in another DAQ

Description:
According to the Digital Waveform Generation section in the M Series User Manual, the FIFO supports a retransmit mode. In the retransmit mode, after all the samples in the FIFO have been clocked out, the FIFO begins outputting all of the samples again in the same order. For example, if the FIFO contains five samples, the pattern generated consists of sample #1, #2, #3, #4, #5, #1, #2, #3, #4, #5, #1, and so on.
The retransmit mode described for Digital Waveform Generation in the M Series User Manual is the same as the FIFO regeneration described in the Analog Output Data Generation Methods section of the manual.  To set up this method of Digital Waveform Generation in DAQmx set the RegenMode property in a DAQmx Write property node to Allow Regeneration and set the DO.UseOnlyOnBrdMem property in a DAQmx Channel property node to True.
This VI demonstrates how to accomplish this.  It was tested using a NI USB-6229 and is written in LabVIEW 2010.  If your M Series device is not recognized as Dev1 in Measurement & Automation Explorer, then you will need to open up the block diagram and change the channel constants to reflect your system set-up.  You will also need to wire P0.0 to AI 0 on the device in order for this VI to function properly

Steps to implement or execute code
To implement this example:

  1. Run the VI
  2. (Optional) Access the block diagram to change the DAQ configurations to be used by the VI
  3. (Optional) Turn on the Highlight Execution to see the flow of the VI


To execute this example:

  1. Install the required software.
  2. Connect the DAQ hardware that supports the DIO, Counter and Analog Input features
  3. Confirm the connection with the MAX with TestPanel
  4. Open the VI and refer the Implement Steps


Requirements
Software
LabVIEW 2012 or compatible
NI-DAQmx 16.0 or compatible

Hardware
cDAQ with C series Digital IO, Counter and Analog Input Module

 

fp.JPG

 

bd.JPG

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

Josh B
Applications Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Now_With_Underscores
NI Employee (retired)
on

This should be a built in Labview Example.

-John Sullivan
Problem Solver