ClocksAnalog InputsAnalog OutputsDigital InputsDigital OutputsEncoder InputsPWM OutputsOther InputsOther OutputsInterruptsWatchdogBoard-Specific OptionsPropertiesTargetsSee Also navigation bar

NI PXI-6259

The National Instruments PXI-6259 is a PXI based M Series card. Please see the National Instruments' website for the NI PXI-6259 data sheet. The Rapid Control Prototyping Toolkit driver name for this card is ni_pxi_6259 .

NI PXI-6259

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 VIs.

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

Warning The HIL Read Timebase VI only supports a buffer size of 1. The same holds true of the task creation functions. When adding a timebase VI, 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 PXI-6259 supports 32 analog inputs (channels 0 to 31) with 16-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 minimum and maximum for each channel in the Analog Inputs tab of the HIL Initialize VI. All of the analog inputs must have the same input range for this card.

Analog Outputs

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

The valid output ranges are ±10V and ±5V . To change from the default range of ±10V, set the minimum and maximum for each channel in the Analog Outputs tab of the HIL Initialize VI. All of the analog outputs must have the same output range for this card.

In order to have analog outputs set to a particular voltage when the block diagram is run or stopped, the analog outputs must be configured on the HIL Initialize VI's Analog Outputs tab. Set the Initial analog outputs and Final analog outputs to the desired voltage values.

Digital I/O

The NI PXI-6259 supports 48 bidirectional digital 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, the direction of each digital I/O line should be configured on the HIL Initialize VI's Digital I/O tab.

To set the digital output values when the block diagram is run or stopped, set the Initial digital outputs and Final digital outputs to the desired values respectively.

Encoder Inputs

The NI PXI-6259 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 block diagram is run, the encoder inputs must be configured on the HIL Initialize VI's Encoder Inputs tab. The NI PXI-6259 supports non-quadrature (count and direction), 1X quadrature, 2X quadrature and 4X quadrature. The NI PXI-6259 does not support encoder filtering.

PWM Outputs

The NI PXI-6259 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 block diagram is run or stopped, the PWM outputs must be configured on the HIL Initialize VI's PWM Outputs tab. The Initial output checkbox should always be checked.

Set the PWM output mode field to the desired output mode. The NI PXI-6259 supports all the PWM output modes: duty cycle, frequency or period. See the description of the HIL Initialize VI for details on these modes. Then set the PWM output frequency in Hz or duty cycle field to the desired frequency or duty cycle. 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 reciprocals 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 does not produce an error. The driver simply saturates the value at the limits.

Other Inputs

The NI PXI-6259 card does not support other inputs.

Other Outputs

The NI PXI-6259 card does not support other outputs.

Interrupts

The NI PXI-6259 card, or its driver, does not support any interrupt sources.

Watchdog

The NI PXI-6259 card does not support a watchdog timer.

Board-Specific Options

The board-specific options are entered on the HIL Initialize VI'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. You can click the browse button to the right of the Board-specific options field to bring up a dialog to configure these options. The name of the option in the dialog is shown in parentheses where applicable.

terminal_board=mx_series

This option is recommended for use with Quanser's NI M&X-Series terminal board. The terminal board already includes a quadrature decoding chip so the Encoder quadrature field on the Encoder Inputs tab of the HIL Initialize VI must be set to the non-quadrature mode 0 (the default). Using this option for a NI M-series card then reconfigures the default terminal input terminal for counter direction control in the non-quadrature mode from PFI10 and PFI11 for counter 0 and 1 respectively to port2/line2 and port2/line3. Note that these two digital lines will become unavailable for general digital I/O use. Likewise using this option for a NI X-series card then reconfigures the default terminal input terminal for counter direction control in the non-quadrature mode from PFI10, PFI11 PFI12, and PFI7, for counters 0, 1, 2 and 3, respectively, to port2/line2, port2/line3, port1/line2, and port1/line7. Note that these four digital lines will become unavailable for general digital I/O use. This option also inverts the quadrature count direction to provide a consistent encoder count direction across all of the RCP-Toolkit-supported terminal boards.

encoder_reverse_count_direction=false|true (Reverse the direction of encoder counting)

Set this option to true to reverse the direction of the encoder counting in all quadrature modes. Set it to false to leave the encoder counting in all quadrature modes in the default count direction.

encoder_0_direction_terminal="PFI<n>" (Encoder #0 direction terminal)

This option reassigns the terminal that determines the encoder direction for channel 0. For example: encoder_0_direction_terminal="PFI9"

Any combination of direction terminals can be changed. Also note that the terminal names correspond to the National Instruments hardware description such as "PFI5" rather than the absolute digital line count used by the RCP Toolkit. Please refer to the DAQmx and National Instruments' documentation for further information on valid terminal names.

encoder_1_direction_terminal="PFI<n>" (Encoder #1 direction terminal)

This option reassigns the terminal that determines the encoder direction for channel 1. See the encoder_0_direction_terminal option for examples.

pwm_0_output_terminal="PFI<n>" (PWM #0 output terminal)

This option reassigns the output terminal for PWM channel 0. For example: pwm_0_output_terminal="PFI0"

Any combination of output terminals can be changed. Also note that the terminal names correspond to the National Instruments hardware description such as "PFI5" rather than the absolute digital line count used by the RCP Toolkit. Please refer to the DAQmx and National Instruments' documentation for further information on valid terminal names.

pwm_1_output_terminal="PFI<n>" (PWM #1 output terminal)

This option reassigns the output terminal for PWM channel 1. See the pwm_0_output_terminal option for examples.

Properties

The NI PXI-6259 card does not support any properties.

Targets

Target

Supported

Comments

RCP Windows (64-bit) Target

Yes

Fully supported.

See Also

 

navigation bar