Clocks Analog Inputs Analog Outputs Digital Inputs Digital Outputs Encoder Inputs PWM Outputs Other Inputs Other Outputs Interrupts Watchdog Board-Specific Options Properties Targets See Also navigation bar

NI PCI-6289

The National Instruments PCI-6289 is an M Series card for a PCI slot. For more information, visit the National Instruments' website for the NI PCI-6289.

The QUARC driver name for this card is ni_pci_6289 .

NI PCI-6289

Beta

This driver is currently a beta version. Quanser does not guarantee that this driver will work as expected and shall not be liable for any damage resulting from its use. However, if you are using this driver, we would appreciate any feedback at tech@quanser.com.

Clocks

This card is part of the DAQmx API, and therefore the hardware clocks cannot be directly accessed. The clocks can only be set indirectly with the functions that utilize them such as the timebase blocks.

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. The same holds true of the task creation functions. 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."

Analog Inputs

The NI PCI-6289 supports 32 analog inputs (channels 0 to 31) with 18-bit resolution.

The valid input ranges are ±10V, ±5V, ±2.0V, ±1.0V, ±0.5V, ±0.2V, and ±0.1V. To change from the default range of ±10V, set the selected channels in the Analog Inputs tab of the HIL Initialize block to the channels in use. For example, enter 4:7 to indicate channels 4 through 7. Specify [0, 4, 5] to indicate channels 0, 4, and 5. Next set the analog input maximum and minimum.

The supported analog input configurations are Referenced singled-ended (0), Non-referenced singled-ended (1), Differential (2). In order to change the analog input configuration for the selected channels in the Analog Inputs tab of the HIL Initialize , set the Analog input channels field to the analog input channels on the board for the current diagram, and then set the Analog input configurations field to the desired configuration. For example, enter [0 1 2] in the Analog input channels field and [0 0 2] in the Analog input configurations field, to set channel 0 to referenced single-ended, channel 1 to referenced single-ended, and channel 2 to differential.

By default, all NI 60xx (E Series), NI 62xx (M Series), NI 63xx (X Series) boards have the default analog input configuration as:

For devices with 8 channels:

Differential for the first four channels, referenced single-ended for the next four channels.

For devices with 16 channels or more:

Differential for eight channels followed by referenced single-ended for eight channels. For instance, channels 0-7, 16-23, and 32-39 are differential. Channels 8-15, 24-31, and 40-47 are referenced-single ended.

Note that when configuring for differential inputs, the positive and negative pairs of the signals must be connected as indicated above. For example for cards that have 32 analog input channels, and if you want to use the maximum number of differential inputs (i.e. 16 differential inputs), then the first differential input's positive line must be connected to channel 0, and negative line to channel 8. The second differential input's positive line must be connected to channel 1, and negative line to channel 9. This continues for the first eight differential inputs. Then the ninth differential input's positive line must be connected to channel 16, and negative line to channel 24. The tenth differential input's positive line must be connected to channel 17, and negative line to channel 25. This continues for the remaining channels. In order to read the differential input values, the input channels must be set to [0-7, 16-23].

Warning

Note that when using the HIL Read Analog Timebase block, the samples in buffer must be set to 1 for this card.

Analog Outputs

The NI PCI-6289 supports 4 analog outputs (channels 0 to 3) with 16-bit resolution.

The valid output ranges are ±10V, ±5V, ±2V, and ±1V. To change from the default range of ±10V, set the selected channels in the Analog Outputs tab of the HIL Initialize block to the channels in use. For example, enter 0:1 to indicate channels 0 through 1. Specify [0] to indicate channel 0. Next set the analog output maximum and minimum.

In order to have analog outputs set to a particular voltage when the model is loaded or unloaded, the analog outputs must be configured on the HIL Initialize block's Analog Outputs tab. Set the Analog output channels field to all the analog output channels that will be used on the board for the current diagram. For example, enter 0:1 to indicate channels 0 through 1. Specify [0] to indicate channel 0. Set the Analog output maximums and Analog output minimums fields matching the desired range of the analog outputs. Finally, set the Initial analog outputs and Final analog outputs to the desired voltage values. If the vectors specified in these fields are shorter than the channel vector then the value of the last element in the vector will be used for the rest of the channels. Hence, a scalar value will apply to all channels specified in the Analog output channels field.

Warning

Note that when using the HIL Write Analog Timebase block, the samples in buffer must be set to 1 for this card.

Digital Inputs

The NI PCI-6289 supports 48 digital input lines (lines 0 to 47).

A digital I/O line cannot be used as an input and output at the same time.

Since the digital I/O lines may be individually programmed as inputs or outputs, all the channels which will be used for digital inputs should be configured on the HIL Initialize block's Digital Inputs tab. Set the Digital input channels field to all the digital I/O channels that will be used as digital inputs on the board for the current diagram. For example, enter 2:5 to designate lines 2 through 5 as digital inputs. Specify [0, 4, 5] to indicate that lines 0, 4 and 5 are to be configured as digital inputs.

Digital Outputs

The NI PCI-6289 supports 48 digital output lines (lines 0 to 47).

A digital I/O line cannot be used as an input and output at the same time.

Since the digital I/O lines may be individually programmed as inputs or outputs, all the channels which will be used for digital outputs should be configured on the HIL Initialize block's Digital Outputs tab. Set the Digital output channels field to all the digital I/O channels that will be used as digital outputs on the board for the current diagram. For example, enter 2:5 to designate lines 2 through 5 as digital outputs. Specify [0, 4, 5] to indicate that lines 0, 4 and 5 are to be configured as digital outputs.

To set the digital output values when the model is loaded or unloaded, set the Initial digital outputs and Final digital outputs to the desired values respectively. If the vectors specified in these fields are shorter than the channel vector then the value of the last element in the vector will be used for the rest of the channels. Hence, a scalar value will apply to all channels specified in the Digital output channels field.

Encoder Inputs

The NI PCI-6289 supports 2 quadrature encoder inputs with 32-bit count values (channels 0 and 1). Note that since this card uses its counters for both encoder inputs and PWM outputs, you can only use a counter as either an encoder input or a PWM output channel.

In order to set the encoder counters to a particular count or to change the default quadrature when the model is loaded, the encoder inputs must be configured on the HIL Initialize block's Encoder Inputs tab. Set the Encoder input channels field to all the encoder channels that will be used on the board for the current diagram. The NI PCI-6289 supports non-quadrature (count and direction), 1X quadrature, 2X quadrature and 4X quadrature. If the vectors specified in these fields are shorter than the channel vector than the value of the last element in the vector will be used for the rest of the channels. Hence, a scalar value will apply to all channels specified in the Encoder input channels field. The NI PCI-6289 does not support encoder filtering.

PWM Outputs

The NI PCI-6289 supports 2 32-bit PWM Outputs using its 2 counters (channels 0 and 1). The PWM outputs on this card use a counter timebase rate of 80 MHz. Note that since this card uses its counters for both encoder inputs and PWM outputs, you can only use a counter as either an encoder input or a PWM output channel.

In order to configure the PWM mode or frequency, or to set the value of the PWM outputs when the model is loaded or unloaded, the PWM outputs must be configured on the HIL Initialize block's PWM Outputs tab. Set the PWM output channels field to all the PWM output channels that will be used on the board for the current diagram. For example, enter 0:1 to indicate channels 0 and 1. Specify 1 to indicate channel 1 alone. Also, the Set PWM output parameters at model start checkbox should always be checked.

Set the PWM output mode field to the desired output mode. The NI PCI-6289 supports all the PWM output modes: duty cycle, frequency or period. See the description of the HIL Initialize block for details on these modes. Then set the Frequencies in Hz or duty cycle field to the desired frequency or duty cycle. If the vectors specified in these fields are shorter than the channel vector, the value of the last element in the vector will be used for the rest of the channels. Hence, a scalar value will apply to all channels specified in the PWM output channels field. Note that this card is part of the National Instruments' DAQmx API and one of the limitations of this API is that you cannot output a PWM signal with a 0% or 100% duty cycle. Furthermore, a value of 0 for frequency is also not acceptable. When in duty cycle mode, the acceptable range of duty cycles are:

Note that the PWM signal period is the frequency inverted. Therefore, the acceptable value for duty cycle is related to the frequency at which the signal is being generated. In frequency mode, the acceptable range of frequencies are related to the duty cycle of the signal and are as follows:

In period mode, the maximum and minimum values for period are recipricols of the minimum/maximum values for frequency above.

Warning

As mentioned earlier in this section, the counters cannot be used as both encoder inputs and PWM outputs. Attempting to do so would produce an error message.

Warning

Due to the DAQmx API limitations, a value of 0 (0%) and 1 (100%) for duty cycle is not accepted. Also, a frequency or a period with value of 0 is also unacceptable. However, attempting to command a value which is out of range would not produce an error. The driver would simply saturate the value at the limits.

Other Inputs

The NI PCI-6289 card does not support other inputs.

Other Outputs

The NI PCI-6289 card does not support other outputs.

Interrupts

The NI PCI-6289 card, or its driver, does not support any interrupt sources.

Watchdog

The NI PCI-6289 card does not support a watchdog timer.

Board-Specific Options

The board-specific options are entered on the HIL Initialize block's Main tab. All of the options follow the form:

option1=value[,option2=value...]

Multiple options are entered on the same line separated by semicolons. Note that there are no spaces in the line. The options and their values are not case sensitive for the National Instruments boards. The following are the available options and valid values for this board.

Properties

The NI PCI-6289 card does not support any properties.

Targets

Target

Supported

Comments

QUARC Win32 Target

Yes

Fully supported.

QUARC Win64 Target

Yes

Fully supported.

QUARC Linux Nvidia Target

No

Not supported.

QUARC Linux QBot Platform Target

No

Not supported.

QUARC Linux QCar 2 Target

No

Not supported.

QUARC Linux QDrone 2 Target

No

Not supported.

QUARC Linux Raspberry Pi 3 Target

No

Not supported.

QUARC Linux Raspberry Pi 4 Target

No

Not supported.

QUARC Linux Raspberry Pi ARM64 Target

No

Not supported.

QUARC Linux RT ARMv7 Target

No

Not supported.

QUARC Linux x64 Target

No

Not supported.

QUARC Linux DuoVero Target

No

Not supported.

QUARC Linux DuoVero 2016 Target

No

Not supported.

QUARC Linux Verdex Target

No

Not supported.

QUARC QNX x86 Target

No

Not supported.

Rapid Simulation (RSIM) Target

Yes

Supported with no communication to the hardware.

Normal simulation

Yes

Supported with no communication to the hardware.

See Also

 

navigation bar