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

Quanser QUBE-Servo 2

The Quanser QUBE-Servo 2 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-Servo2

The QUARC driver name for this card is qube_servo2_usb.

To select the Quanser QUBE-Servo 2 HIL board, pass qube_servo2_usb as the card type argument to the hil_open function.

The Quanser QUBE-Servo 2 I/O channels are described below.

Clocks

There are currently no configuration options for the Quanser QUBE-Servo 2 clocks.

Analog Inputs

The Quanser QUBE-Servo 2 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 2 supports one analog output, which is channel zero. The analog output drives the motor voltage. Its maximum range is ±15V.

Digital Inputs

The Quanser QUBE-Servo 2 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 2 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 is disabled. When it is high, the motor amplifier is enabled.

Encoder Inputs

The Quanser QUBE-Servo 2 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 inverted pendulum angle)

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 2 card does not support PWM outputs.

Other Inputs

The Quanser QUBE-Servo 2 supports one other input channel, which is a digital tachometer reading for motor 0. The units are counts/s. The channel number is 14000, which is the standard other input channel for encoder velocities.

Other Outputs

The Quanser QUBE-Servo 2 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 2 card, or its driver, does not support any interrupt sources.

Watchdog

The Quanser QUBE-Servo 2 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 2 card does not support any board-specific options.

Properties

The Quanser QUBE-Servo 2 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_HARDWARE_VERSION

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

QUARC Win32 Target

Yes

Fully supported.

QUARC Win64 Target

Yes

Fully supported.

QUARC Linux Nvidia Target

Yes*

Support for this target is in beta. If you are using it, we would appreciate any feedback.

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

Yes*

Support for this target is in beta. If you are using it, we would appreciate any feedback.

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