Configuring the Data Transfer Request Condition Property in NI-DAQmx

Publish Date: Aug 26, 2011 | 2 Ratings | 4.50 out of 5 | Print | Submit your review

Table of Contents

  1. Overview
  2. Data Transfer Request Condition for Analog Output Tasks
  3. Data Transfer Request Condition for Analog Input Tasks
  4. Example VI

The National Instruments Getting Started with NI-DAQmx Series is aimed at helping you learn NI-DAQmx programming fundamentals. Through video and text tutorials, this series will take you from verifying your device's operation in Measurement & Automation Explorer (MAX) to programming data acquisition applications using LabVIEW. It is intended for both the beginner who wants to learn how to use the DAQ Assistant as well as the experienced user who wishes to take advantage of advanced NI-DAQmx functionality.

1. Overview

For few tasks you might need to specify a different condition other than the default for the DAQ board to request data from the buffer or perhaps write data to it. One of the examples would be if you want to perform continuous analog output and change the output waveform while the DAQ board is still outputting data. But doing so using the general procedure you might see several seconds of delay before the new waveform is actually output. Using few of the available DAQmx property nodes it's possible to overcome these concerns and change the output waveform with reduced latency.

Back to Top

2. Data Transfer Request Condition for Analog Output Tasks

In order to configure a DAQ board to perform analog output of a waveform that you can change while the board is outputting, you need to set your board to Do Not Allow Regeneration mode. This is done with the DAQmx Write property node and specifically the Regeneration Mode property. Setting this to Do Not Allow Regeneration forces the board to request new data from LabVIEW as the board's internal FIFO outputs the old data. Using this, you need to have a DAQmxWrite VI in a while loop that will continuously update the buffer. Figure 1 illustrates this property nodes.

Figure 1: DAQmx Write Property Node for Defining Regeneration Mode

C Function: DAQmx<Get/Set/Reset>WriteRegenMode

When you set the board to Do Not Allow Regeneration you also need to configure the Data Transfer Request Condition. This is found under the DAQmx Channel property node under Analog Output >> General Properties >> Advanced >> Data Transfer and Memory >> Data Transfer Request Condition. Setting this property determines how fast the changed waveform actually shows up on the output pin.

When set to On Board Memory Less than Full the board will request new data to be sent to the card each time the board's onboard FIFO is less than full. This means that if you want to change the waveform that you are outputting, it will take several seconds for the change to be seen on the output because the new waveform data will need to propagate through the board's entire FIFO. In this setting the board's FIFO stays full. Figure 2 shows the specific DAQmx Channel Property Node.


Figure 2: DAQmx Channel Property Node for Defining Data Transfer Request Condition

C Function: DAQmx<Get/Set/Reset>AODataXferMech

When set to On Board Memory Empty the board will request new data when its onboard FIFO is empty. This means that when you want to change the waveform that you are outputting, the new waveform will be seen quickly on the output. Since the board's FIFO is nearly empty when the new data is sent to it the new data does not need to propagate through the entire FIFO before is output. The new data is already at the end of the FIFO when it gets to the DAQ board and is immediately outputted.


When using On Board Memory Less than Full you need to set your buffer to be at least as large as your board's onboard FIFO. When using On Board Memory Empty your board is operating with a much smaller portion of its FIFO. Because of this you can set the buffer size to be much smaller. It is suggested that you start with a buffer 500 and increase or decrease the number for best performance.

Back to Top

3. Data Transfer Request Condition for Analog Input Tasks

For an analog input tasks a similar property node can be used to specify the condition for transferring data from the onboard memory of the DAQ device to the buffer. You would need  to use the DAQmx Channel Property node and select Analog Input >> General Properties >> Advanced >> Data Transfer and Memory >> Data Transfer Request Condition property to do so.

Back to Top

4. Example VI



An example VI that could be used with LabVIEW 7.0 or later has been attached for reference.

  

Back to Top

Bookmark & Share


Downloads


Ratings

Rate this document

Answered Your Question?
Yes No

Submit