QUBE-SERVO-myRIO
The QUBE-SERVO-myRIO is an integrated DC-servo motor experiment designed to work on the NI myRIO platform. It is designed to help teach fundamental control concepts and theories on an easy-to-use and intuitive platform. The QUARC Target associated with the QUBE-SERVO-myRIO is the QUARC Linux ARMv7 Target. The QUBE-SERVO-myRIO HIL card may only be used with QUARC when this target is selected. It is possible to simultaneously connect two QUBE-SERVO-myRIO devices to the NI myRIO through the MXP A and MXP B connectors at the same time. Each QUBE-SERVO-myRIO device has the following characteristics:
Furthermore, the NI myRIO MSP C connector and onboard I/O can also be accessed with the following characteristics:
The QUARC driver name for this card is qube_servo_myrio.
To select the QUBE-SERVO-myRIO HIL board, select the QUARC qube_servo_myrio board type from the drop-down list on the Main tab of the HIL Initialize block.
Note that the Linux ARMv7 target must be selected to use the QUBE-SERVO-myRIO board. |
The QUBE-SERVO-myRIO I/O channels are described below.
Clocks
There are currently no configuration options for the QUBE-SERVO-myRIO clocks.
Analog Inputs
The QUBE-SERVO-myRIO supports 4 analog inputs with 12-bit resolution. Hence, analog input channel numbers range from 0 to 3.
The valid input ranges are ±10V for channels 0 to 1, and ±2.5V for channels 2 to 3 (which are the audio input left and right, respectively).
Analog Outputs
The QUBE-SERVO-myRIO supports 6 analog output with 12-bit resolution. Hence, analog input channel numbers range from 0 to 5.
The valid output ranges are ±10V for channels 0 to 3, and ±2.5V for channels 4 to 5 (which are the audio output left and right, respectively).
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 1:3
to indicate channels 1
through 3. Specify [0, 2, 7]
to indicate channels 0, 2 and 7.
Note that analog output channel 0 is used to command the motor of the QUBE-SERVO when connected to MXP A connector, where as analog output channel 2 is used to command the motor of the QUBE-SERVO when connected to MXP B. Channel 1 and 3 are reserved for internal use only.
Digital Inputs
The QUBE-SERVO-myRIO supports 8 bidirectional digital I/O lines and one special digital input lines. Hence digital input channel numbers range from 0 to 8. Channel 8 represents the ONBD_BUT0.
A bidirectional digital I/O line cannobe 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.
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 on the HIL Initialize
block's Digital Inputs tab. Set the Digital Input channels
field to all the digital input channels that will be used for the current diagram. For example, enter 0:3
to designate
lines 0 through 3. Specify [0, 2]
to indicate that lines 0 and 2 are to be used in the current diagram.
Note that the bidirectional digital I/O lines can also be configured as PWM or encoder. All of these I/O have precedent over the digital input or output functions. Therefore if the pin is configured as one of the other functions, the digital input or output functions would no longer function. Refer to Board-specific options for more details about how to configure all these functions that share the same pin.
Digital Outputs
The QUBE-SERVO-myRIO supports 8 bidirectional digital I/O lines and 4 special digital output lines. Hence digital input channel numbers range from 0 to 11. Channels 8 to 11 represents the ONBD_LED0 to ONBD_LED3.
A bidirectional digital I/O line cannobe 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.
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 on the HIL Initialize
block's Digital Outputs tab. Set the Digital Output channels
field to all the digital output channels that will be used for the current diagram. For example, enter 0:3
to designate
lines 0 through 3. Specify [0, 2]
to indicate that lines 0 and 2 are to be used in the current diagram.
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, 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.
Note that the bidirectional digital I/O lines can also be configured as PWM or encoder. All of these I/O have precedent over the digital input or output functions. Therefore if the pin is configured as one of the other functions, the digital input or output functions would no longer function. Refer to Board-specific options for more details about how to configure all these functions that share the same pin.
Encoder Inputs
The QUBE-SERVO-myRIO supports 6 encoder inputs. Hence encoder channel numbers range from 0 to 5. These channels support non-quadrature as well as 4x quadrature modes.
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. For example, enter
0:1
to
indicate channels 0 through 1 are used as encoder inputs.
The QUBE-SERVO-myRIO supports non-quadrature (count and direction) and 4X quadrature. Since the QUBE-SERVO-myRIO has 32-bit counters, valid initial count values range from -2147483648 to +2147483647. 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 Encoder input channels field.
Note that encoder channels 0 and 1 are used to get the encoder readings when the QUBE-SERVO device is connected to MXP A connector, where as channels 2 and 3 are used to get the encoder readings when the QUBE-SERVO device is connected to MXP B connector.
Note that the bidirectional digital I/O lines can also be configured as PWM, or encoder. All of these I/O have precedent over the digital input or output functions. Therefore if the pin is configured as one of the other functions, the digital input or output functions would no longer function. Refer to Board-specific options for more details about how to configure all these functions that share the same pin.
PWM Outputs
The QUBE-SERVO-myRIO driver supports 2 PWM output channels. Hence, PWM output channels range from 0 to 1. Each PWM channel is completely independent and can have its own duty cycle and frequency.
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.
The maximum output frequency is 20 MHz. The number of bits of resolution decreases with increasing PWM output frequency.
For a complete description of all the options available, including diagrams, refer to PWM Output Configurations.
Note that the bidirectional digital I/O lines can also be configured as PWM, or encoder. All of these I/O have precedent over the digital input or output functions. Therefore if the pin is configured as one of the other functions, the digital input or output functions would no longer function. Refer to Board-specific options for more details about how to configure all these functions that share the same pin.
Other Inputs
The QUBE-SERVO-myRIO supports 3 other inputs. These inputs represent the on board accelerometers of the NI myRIO. The channel numbers for the accelerometers are 4000-4002, representing linear accelerations in the X, Y and Z directions respectively. The units are m/s2.
Other Outputs
The QUBE-SERVO-myRIO card does not support other outputs.
Interrupts
The QUBE-SERVO-myRIO card, or its driver, does not support any interrupt sources.
Watchdog
The QUBE-SERVO-myRIO card does not support a watchdog timer.
Board-Specific Options
The QUBE-SERVO-myRIO has a number of board-specific options to control specialized functionality of the card. These options control which functions to enable on the bidirectional digital I/O lines.
Due to the large number of bidirectional digital I/O lines, it is recommended to use board-specific options dialog to set the board-specific options instead of typing them in manually. The dialog also has option to automatically update the Encoder input channels and PWM output channels in the Encoder Inputs and PWM Outputs tabs, respectively once the particular function is selected for a channel.
Furthermore the board-specific options dialog also has an option to enable National Instrument naming convention (e.g. MSPC_PWM0 instead of PWM Channel 0) for each channel to allow easier channel selection for users who are more accustomed to National Instrument naming conventions.
pwm0_en
Set this option to "yes", "y", or "1" to enable the PWM functionality on bidirectional digital I/O pin number 0.
Similar options exist for the other PWM channels e.g. pwm1_en, pwm2_en, etc.
enc0_en
Set this option to "yes", "y", or "1" to enable the encoder functionality on bidirectional digital I/O pin number 0 and 1.
Similar options exist for the other encoder channels e.g. enc1_en, enc2_en, etc.
When using QUBE-SERVO on MXP A connection, enc0_en and enc1_en must be enabled. When using QUBE-SERVO on MXP B connection, enc2_en and enc3_en must be enabled.
enc0_dir
Set this option to "yes", "y", or "1" to reverse the direction of encoder 0.
Similar options exist for the other encoder channels e.g. enc1_dir, enc2_dir, etc.
When using QUBE-SERVO on MXP A or B connectors, enc0_dir to enc3_dir do not need to be set.
Properties
The QUBE-SERVO-myRIO card does not support any properties.
Connectors
The QUBE-SERVO-myRIO board uses a custom FPGA personality on the NI myRIO to allow QUBE-SERVO device to be controlled via the MXP A and B connector. When using this custom FPGA personality, the MXP A and B connector can only be used for the QUBE-SERVO device. However the full capability of the MSP C connector can be utilized. Refer to the NI myRIO 1900 User Guide for definition of pins on MSP C. The following shows the possible pin functions on the NI myRIO on the left-hand side for reference and the Quanser channel numbers on the right-hand side.
MSP C
NI Labels | Functions/Channels | |
5V ― | 20 | ― 5V |
DGND ― | 19 | ― DGND |
DIO7 ↔ / PWM1 ← | 18 | ↔ DIO 7 / → PWM 1 |
DIO6 ↔ / ENC1.B → | 17 | ↔ DIO 6 / ← ENC.B 5 |
DIO5 ↔ | 16 | ↔ DIO 5 |
DIO4 ↔ / ENC1.A → | 15 | ↔ DIO 4 / ← ENC.A 5 |
DIO3 ↔ / PWM0 ← | 14 | ↔ DIO 3 / → PWM 0 |
DIO2 ↔ / ENC0.B → | 13 | ↔ DIO 2 / ← ENC.B 4 |
DIO1 ↔ | 12 | ↔ DIO 1 |
DIO0 ↔ / ENC0.A → | 11 | ↔ DIO 0 / ← ENC.A 4 |
AI1- → | 10 | ← AI 1- |
AI1+ → | 9 | ← AI 1+ |
AI0- → | 8 | ← AI 0- |
AI0+ → | 7 | ← AI 0+ |
AGND ― | 6 | ― AGND |
AO1 ← | 5 | → AO 5 |
AO0 ← | 4 | → AO 4 |
AGND ― | 3 | ― AGND |
-15V ― | 2 | ― -15V |
+15V ― | 1 | ― +15V |
Legend
→▯← | = | input |
←▯→ | = | output |
↔▯↔ | = | bidirectional I/O |
= | 3.3V signal | |
= | unspecified voltage | |
= | power | |
= | ground |
Targets
Target |
Supported |
Comments |
---|---|---|
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. |
|
Yes |
Only supported with a myRIO platform. |
|
No |
Not supported. |
|
No |
Not supported. |
|
No |
Not supported. |
|
No |
Not supported. |
|
No |
Not supported. |
|
Rapid Simulation (RSIM) Target |
No |
Not supported. |
Normal simulation |
No |
Not supported. |
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.