NI USB-6210
The National Instruments USB-6210 is an M Series card for a USB port. For more information, visit the National Instruments' website for the NI USB-6210.
The QUARC driver name for this card is ni_usb_6210 .
Note that this USB card was not designed to be used for real-time control, but rather for slower data acquisition applications. |
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.
Only one hardware timebase may be used at a time. In addition, immediate I/O and task-based I/O cannot use the same channels with the NI USB-6210 card, even if they use different resources. For instance, if a task created using hil_task_create_analog_reader is reading from analog input 0, then hil_read_analog cannot be used to read from analog input 0 while the task is running.
The hil_task_create functions only support a samples_in_buffer argument of 1 when used with the NI USB-6210 card. Attempting to use a different buffer size will result in the error: "The specified buffer size is not valid. It may be out of an acceptable range."
Analog Inputs
The NI USB-6210 supports 16 analog inputs (channels 0 to 15) with 16-bit resolution.
The valid input ranges are ±10V, ±5V, ±1.0V, and ±0.2V. To change from the default range of ±10V, use the hil_set_analog_input_ranges function.
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, use the hil_set_analog_input_configuration function.
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].
Analog Outputs
The NI USB-6210 card does not support analog outputs.
Digital Inputs
The NI USB-6210 supports 4 digital input lines (lines 0 to 3).
Note that this card has dedicated digital inputs that cannot be used for digital outputs. |
Despite the fact that this card has dedicated digital input lines, you still need to configure all the channels which will be used as digital inputs. They should be configured with the hil_set_digital_directions function. Set the input_channels argument to all the digital input channels that will be used on the board.
Digital Outputs
The NI USB-6210 supports 4 digital output lines (lines 4 to 7).
Note that this card has dedicated digital outputs that cannot be used for digital inputs. Also note that the digital outputs begin at line 4. |
Despite the fact that this card has dedicated digital output lines, you still need to configure all the channels which will be used as digital outputs. They should be configured with the hil_set_digital_directions function. Set the output_channels argument to all the digital output channels that will be used on the board.
Encoder Inputs
The NI USB-6210 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, use the hil_set_encoder_counts function. Configure the quadrature mode using the hil_set_encoder_quadrature_mode function. The NI USB-6210 supports non-quadrature (count and direction), 1X quadrature, 2X quadrature and 4X quadrature. The NI USB-6210 does not support encoder filtering.
The PFI signals in NI USB-6210 are unidirectional, and there are only 4 inputs available (PFI0-PFI3). Due to the limited number of inputs, CTR-SRC and CTR-AUX for each counter share the same physical pin which is fine if the counters are used in unidirectional mode. To have bidirectional counters, the CTR-AUX should be assigned to another physical input, and again due to the limited number of input pins, this cannot be done for both counters at the same time, so only one counter can be used in bidirectional mode.
To assign the CTR-AUX signal to another physical input, the board specific options should be changed using the hil_set_card_specific_options function. Use the encoder_<n>_direction_terminal options (where <n> is the channel number) to change the direction terminal to a digital input which is not in use.
PWM Outputs
The NI USB-6210 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.
Use the hil_set_pwm_mode function to set the desired PWM output mode. The NI USB-6210 supports all the PWM output modes: duty cycle, frequency or period. See the description of the PWM Output Configurations for details on these modes. Then use the hil_set_pwm_frequency or hil_set_pwm_duty_cycle function to set the desired frequency or duty cycle respectively. 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.
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. |
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 USB-6210 card does not support other inputs.
Other Outputs
The NI USB-6210 card does not support other outputs.
Interrupts
The NI USB-6210 card, or its driver, does not support any interrupt sources.
Watchdog
The NI USB-6210 card does not support a watchdog timer.
Board-Specific Options
The board-specific options are set using the hil_set_card_specific_options function. 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 USB-6210 card does not support any properties.
Targets
Target |
Supported |
Comments |
---|---|---|
Yes |
Fully supported. |
|
Yes |
Fully supported. |
|
No |
Not supported. |
|
No |
Not supported. |
|
No |
Not supported. |
|
No |
Not supported. |
|
No |
Not supported. |
|
No |
Not supported. |
|
No |
Not supported. |
|
No |
Not supported. |
|
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
Copyright ©2023 Quanser Inc. This page was generated Thu 05/04/2023. Submit feedback to Quanser about this page.