Quanser Qube-Servo 3
The Quanser Qube-Servo 3 is an integrated DC-servo motor experiment. It is designed to help teach fundamental control concepts and theories on an easy-to-use and intuitive platform. For more information, visit Quanser Qube-Servo3
The QUARC driver name for this card is qube_servo3_usb.
To select the Quanser Qube-Servo 3 HIL board, pass qube_servo3_usb as the card type argument to the hil_open function.
The Quanser Qube-Servo 3 I/O channels are described below.
Clocks
There are currently no configuration options for the Quanser Qube-Servo 3 clocks.
Analog Inputs
The Quanser Qube-Servo 3 supports one analog input, which is channel zero. The analog input measures the current to the motor in Amperes. Its maximum range is ±3A.
Analog Outputs
The Quanser Qube-Servo 3 supports one analog output, which is channel zero. The analog output drives the motor voltage. Its maximum range is ±15V. The pwm_en board specific option must not be set in order to use analog output on this card.
Digital Inputs
The Quanser Qube-Servo 3 supports three digital inputs, which are used for diagnostics. The digital inputs are enumerated in the table below.
Channel |
Description |
---|---|
0 |
Amplifier fault. If the amplifer is enabled and this fault occurs, the amplifier may be experiencing excessive temperatures and shut down to protect itself. |
1 |
Motor stall detected. Occurs when the motor is stalled or excessively slowed and the applied voltage (including deadband compensation) is greater than 5V. |
2 |
Motor stall error. When a stall warning has been asserted continuously for approximately 3s. |
Digital Outputs
The Quanser Qube-Servo 3 supports one digital output, which is channel zero. The digital output acts as an enable for the motor drive circuitry. When this output is low, the motor amplifier is disabled. When it is high, the motor amplifier is enabled.
The Quanser Qube-Servo 3 has internal stall detection and once a stall error is asserted, the amplifier is automatically disables itself. The card can be re-enabled by setting the output low then high again.
Note: Constantly resetting the amplifier whenever a stall-error occurs can result in excessive heat being generated by the motor potentially causing damage. |
Encoder Inputs
The Quanser Qube-Servo 3 supports two encoder inputs. Both channels provide 24-bit count values. These two channels only support 4X quadrature mode. The encoder channels are enumerated in the table below:
Channel |
Description |
---|---|
0 |
Motor position |
1 |
Encoder 1 position (typically used for the inverted pendulum) |
In order to set the encoder counters to a particular count value use the hil_set_encoder_counts function.
The first two encoder inputs are sampled simultaneously when measured using a single HIL Read block.
PWM Outputs
The Quanser Qube-Servo 3 driver supports one PWM output channel, which is channel 0. Its maximum range is ±1 mapping to ±24V. Note, however, that the Quanser Qube-Servo 3 internally limits the output voltage to 15V or a corresponding PWM value of 0.625. The pwm_en board specific option must be set in order to use PWM output on this card.
The PWM mode, frequency or configurations are fixed and cannot be modified.
Note that deadband compensation is not used in the PWM mode. |
Other Inputs
The Quanser Qube-Servo 3 supports two other input channels, which are 32-bit digital tachometer readings based on a 72MHz counter. The other input channels are enumberated in the table below:
Channel |
Description |
---|---|
14000 |
Motor velocity |
14001 |
Encoder 1 velocity (typically used for the inverted pendulum) |
The units are counts/s.
Other Outputs
The Quanser Qube-Servo 3 supports three other output channels, allowing the color of the LED panel to be controlled. Note that each channel supports fractional values between 0 and 1, allowing full RGB color. Refer to the table below for a list of the channels:
Channel |
Description |
Range |
---|---|---|
11000 |
Red component for LED color |
0 to 1 |
11001 |
Green component for LED color |
0 to 1 |
11002 |
Blue component for LED color |
0 to 1 |
Interrupts
The Quanser Qube-Servo 3 card, or its driver, does not support any interrupt sources.
Watchdog
The Quanser Qube-Servo 3 supports a watchdog timer for resetting the outputs on watchdog expiry. Namely, the analog, digital and other output channels will be reset to the user-defined values on watchdog expiry. Resetting of the outputs occurs without software intervention, and therefore may be used as a safety mechanism in the event of software failure.
To enable the watchdog, use the hil_watchdog_start function. Be sure to reload the watchdog periodically using the hil_watchdog_reload function to prevent the watchdog from expiring.
To configure the values to which the output channels are reset on watchdog expiry, use the hil_watchdog_set_analog_expiration_state, hil_watchdog_set_digital_expiration_state and hil_watchdog_set_other_expiration_state functions to set the analog, digital and other output values on watchdog expiration respectively.
Once the watchdog has expired, further I/O on the outputs is disabled until the watchdog state is cleared.
Use the hil_watchdog_clear function to clear the watchdog state. Note that stopping the watchdog does not clear the watchdog state. The watchdog state must be cleared explicitly.
Board-Specific Options
The Quanser Qube-Servo 3 has a number of board-specific options to control specialized functionality of the card.
pwm_en
Set this option to "yes", "y", or "1" to enable control of the motor using PWM command.
When this option is set, the analog output cannot be used. All references to setting initial and final outputs must be removed. In Simulink, in the HIL Initialize block on the Analog Outputs tab, change the Analog Output Channels from [0] to []. On the PWM Outputs tab change the PWM Output Channels from [] to [0]. Also note that deadband compensation is disabled and any user-specified value in the board-specific options will be ignored. |
deadband_compensation
This option offsets the motor command by the specified voltage to compensate for amplifier deadband. The default
value is deadband_compensation=0.65
. This option is only available for analog outputs and will be ignored if the pwm_en
option is used.
Properties
The Quanser Qube-Servo 3 driver currently supports the following read-only properties:
Property |
Type |
Description |
---|---|---|
PROPERTY_INTEGER_VENDOR_ID |
Integer |
Vendor identifier associated with the hardware |
PROPERTY_INTEGER_PRODUCT_ID |
Integer |
Product identifier associated with the hardware |
PROPERTY_INTEGER_FIRMWARE_MAJOR_VERSION |
Integer |
Major version number of the firmware (hardware) |
PROPERTY_INTEGER_FIRMWARE_MINOR_VERSION |
Integer |
Minor version number of the firmware (Qube interface) |
PROPERTY_INTEGER_FIRMWARE_BUILD |
Integer |
Build number of the firmware (currently always zero) |
PROPERTY_INTEGER_FIRMWARE_REVISION |
Integer |
Revision number of the firmware (currently always zero) |
PROPERTY_STRING_MANUFACTURER |
String |
Manufacturer of the device |
PROPERTY_STRING_PRODUCT_NAME |
String |
Product name of the device |
PROPERTY_STRING_MODEL_NAME |
String |
Model name of the device |
PROPERTY_STRING_SERIAL_NUMBER |
String |
Serial number of the device |
PROPERTY_STRING_FIRMWARE_VERSION |
String |
Firmware version of the PC interface |
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.