Start of trail National Instruments PCIe Cards navigation bar

Table of Contents > QUARC > User's Guide > QUARC Data Acquisition Card Support > National Instruments Cards

National Instruments DAQmx Overview

In order to access National Instruments' DAQmx compatible cards using QUARC's data acquisition blocks, you must first install the DAQmx software. The latest version of DAQmx can be downloaded from National Instruments' website www.ni.com.

Configuring the HIL Initialize Block

Included among the DAQmx applications is the Measurement and Automation Explorer (MAX). In the screen shot below, the PCI-6259 has the default device name "Dev1", and the PCI-MIO-16E-4 has a custom name of "MyBoardName".

In the HIL Initialize block, you have the option of either using a numeric board identifier as usual (the first board being board identifier 0), or identifying the board by its device name, such as "Dev1" (without the quotes). If you want to identify the board by device name and you change the name in MAX, you will also need to change the name in the HIL initialize block.

The QUARC DAQmx drivers are designed to dynamically learn which inputs and outputs are being used in order to maximize performance. However, when multiple sample rates are used, this learning process can result in a minor performance degradation until all of the inputs and outputs in use have been added to the internal driver read and write lists.

When running at very high sampling rates, it is recommended that all the channels in use be specified in the HIL Initialize block to eliminate this learning process. It is also recommended that you do not set the initial and final values or the A/D and D/A ranges for ports that are not in use. If you do, they will automatically be added to the read and write list, which may reduce your maximum sample rate, depending on the specific card.

General Input and Output

For the best performance, it is recommended that you only use one input or output block for each given type. For instance, if you have two analog signals to acquire, it is better to use one HIL Read Analog block and demultiplex the output than to use two individual HIL Read Analog blocks.

Limitations

Warning Only one timebase block may be present in a diagram. In addition, an immediate block for the same type of channel can not be used even if they use different resources. For instance, if a HIL Read Analog Timebase block is in use, you cannot also have a HIL Read Analog block in the diagram, even if the two blocks do not read the same analog input channels.

Warning The HIL Read Timebase and HIL Write Timebase blocks only support a buffer size of 1. When adding a timebase block, you must change the Samples in buffer field or you will receive the error "The specified buffer size is not valid. It may be out of an acceptable range."

Digital Input and Output

QUARC addresses the digital inputs and outputs as an absolute line count whereas the National Instruments cards and DAQmx address the lines with a specific port-line location. To use a specific port-line address, you must convert it to an absolute line count. For instance, if you want to input line 4 on port 1, and there are 32 lines on port 0, then you would want to use line 35 (0...31 + 4 = 35). Make sure you are using the line numbers, not the PFI numbers, shown on the data sheet for the card you are using.

Quanser Terminal Boards

Many of National Instrument's cards will work with Quanser's terminal boards. In some cases, some card reconfiguration may be required, but this can often be achieved by setting a single option in the board-specific options. Please refer to the QUARC help pages on individual cards for further information.

 

navigation bar