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 Q8

Deprecated This card is no longer available. For a newer card with similar capabilities, visit the Quanser DAQ website.

The Quanser Q8 is an innovative H.I.L. control board with an extensive range of input and output support. A wide variety of devices with analog and digital sensors as well as quadrature encoders are easily connected to the Quanser Q8. This single-board solution is ideal for use in control systems and complex measurement applications.

The QUARC driver name for this card is q8 .

Quanser Q8

No other board offers this combination of features and performance! Ideal for control systems and measurement of complex systems. The features of the Quanser Q8 are:

This single board integration enables you to turn your PC into a powerful Desktop Control Station.

Clocks

The Quanser Q8 supports two hardware clocks: HARDWARE_CLOCK_0 (0) and HARDWARE_CLOCK_1 (1). Both clocks have 60 ns resolution and 32-bit range. The SYSTEM_CLOCK_1 (-1) clock is also supported. It has 1 ms resolution. The hardware clocks may also be configured as PWM outputs. HARDWARE_CLOCK_0 appears as a PWM output at the CNTR_OUT pin and HARDWARE_CLOCK_1 at the WATCHDOG pin.

By default, the clocks are configured as hardware timebases. To use the clocks as PWM outputs, they must be configured on the HIL Initialize block's Clocks tab. Set the Hardware clocks field to all the clocks that will be used on the board for the current diagram. For example, enter 0:1 to indicate hardware clocks HARDWARE_CLOCK_0 (0) and HARDWARE_CLOCK_1 (1). Specify 1 to indicate HARDWARE_CLOCK_1 (1) only.

Set the Clock mode field to the desired mode. If the vector specified in this field is shorter than the Hardware clocks vector, then the value of the last element in the vector will be used for the rest of the clocks. Hence, a scalar value will apply to all clocks specified in the Hardware clocks field. See the description of the HIL Initialize block for details on these modes.

The Quanser Q8 allows a third hardware "clock" to be specified as a timebase only: HARDWARE_CLOCK_2 (2). This "clock" actually represents the external interrupt line, EXT_INT. Specifying a value of 2 for the hardware clock in a HIL timebase, stream or buffered I/O block causes the EXT_INT line to be used as the interrupt source so that an external clock may be used as a timebase. The Clock mode cannot be set for this hardware clock because it can only be configured as a timebase and not a PWM output.

Analog Inputs

The Quanser Q8 supports 8 14-bit analog inputs with a ±10V range. Hence analog channel numbers range from 0 to 7.

Since the range of the analog inputs is fixed at ±10V, there is no need to configure the analog input ranges.

Analog Outputs

The Quanser Q8 supports 8 12-bit analog outputs in which each channel may be configured for a ±10V, ±5V or 0-10V range. As there are 8 outputs, analog channel numbers range from 0 to 7. The range of each analog output is individually programmable, so each channel may be assigned one of the three supported ranges. The ranges are set on the HIL Initialize block's Analog Outputs tab by setting the Analog output maximums and Analog output minimums fields to the appropriate value of each channel indicated in the Analog output channels field. For example, if the Analog output channels are set to [0, 2, 7] , the Analog output maximums are set to [10, 5, 10] and the Analog output minimums are set to [-10, -5, 0] then channel 0 will be configured for a ±10V output range, channel 2 for a ±5V output range, and channel 7 as a 0-10V range.

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.

Set the Analog output maximums and the Analog output minimums field to the appropriate values for the desired analog output ranges. Then set the Initial analog outputs and Final analog outputs to the desired voltages.

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 Analog output channels field.

Digital Inputs

The Quanser Q8 supports 32 bidirectional digital I/O lines and 3 special digital input lines. Hence digital input channel numbers range from 0 to 34. Channels 32 through 34 are FUSE, EXT_INT and CNTR_EN respectively. A digital I/O line cannot be used as an input and output at the same time.

Since the first 32 digital I/O lines may be individually programmed as inputs or outputs on the Quanser Q8, all of those 32 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 3:15 to designate channels 3 through 15 as digital inputs. Specify [0, 4, 5] to indicate that channels 0, 4 and 5 are to be configured as digital inputs.

Digital Outputs

The Quanser Q8 supports 32 bidirectional digital I/O lines. Hence digital output channel numbers range from 0 to 31. A digital I/O line cannot be used as an input and output at the same time.

Since the 32 digital I/O lines may be individually programmed as inputs or outputs on the Quanser Q8, 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 3:15 to designate channels 3 through 15 as digital outputs. Specify [0, 4, 5] to indicate that channels 0, 4 and 5 are to be configured as digital outputs.

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.

Each digital output can source up to 25 mA of current maximum, with a total of 75 mA maximum for each set of four channels (0-3, 4-7, etc). Do not exceed these maximums!

Encoder Inputs

The Quanser Q8 supports 8 quadrature encoder inputs with 24-bit count values. Hence encoder channel numbers range from 0 to 7.

In order to set the encoder counters to a particular count or to change the default quadrature or filter frequency 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 2:7 to indicate channels 3 through 7 are used as encoder inputs. Specify [0, 2, 7] to indicate that channels 0, 2 and 7 are used as encoder inputs.

The Quanser Q8 supports non-quadrature (count and direction), 1X quadrature, 2X quadrature and 4X quadrature. The Quanser Q8 supports filter frequencies of 1 /(120e-9 * N) where N=1..255. In other words, valid Quanser Q8 filter frequencies range from 33kHz to 8.3MHz. Since the Quanser Q8 has 24-bit counters, valid initial count values range from -8,388,608 to +8,388,607. 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.

PWM Outputs

The Quanser Q8 driver supports two PWM output channels using its two hardware clocks. Change the mode of a hardware clock to use it as a PWM output. See the section on Clocks above.

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.

Set the PWM output mode field to the desired output mode. The Quanser Q8 supports all the PWM output modes: duty cycle, frequency or period. See the description of the HIL Initialize block for details on these modes. Then set the Frequencies in Hz or duty cycle field to the desired frequency or duty cycle. The Quanser Q8 supports PWM output frequencies from 0.008Hz to 16.7MHz. However, the PWM output frequency affects the number of bits of resolution. For example, a frequency of 16.276kHz results in 10 bits of resolution in the duty cycle, while a frequency of 4.069kHz results in 12 bits of resolution. A frequency of 65.104kHz results in 8 bit resolution. 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 PWM output channels field.

Other Inputs

The Quanser Q8 card does not support other inputs.

Other Outputs

The Quanser Q8 card does not support other outputs.

Interrupts

The Quanser Q8 supports 18 different interrupt sources. Interrupts may be generated from the encoders or external interrupt sources.

Fuse interrupt

The Quanser Q8 is capable of detecting if the fuse on the terminal board blows. While the fuse should never blow under normal operation, failure of the fuse is a safety-critical event so the Quanser Q8 is capable of generating an interrupt when it happens. Use interrupt channel 0 to respond to this interrupt.

External interrupt (EXT_INT) interrupt

This interrupt is generated when a falling edge appears on the EXT_INT pin on the Control header. Use interrupt channel 1 to respond to this interrupt.

Encoder index pulse interrupts

Each encoder channel is capable of generating an interrupt when the index pulse is seen. There is a separate interrupt for each encoder channel. Use interrupt channels 1000-1007 to respond to these interrupts for encoder channels 0-7 respectively.

Encoder error interrupts

The Quanser Q8 can determine if there is excessive noise on an encoder channel. While excessive noise may not lead to an error in the encoder counts due to the on-board digital filtering, it is a condition that warrants attention. Each encoder channel is capable of generating an interrupt when excessive noise is seen on the inputs. There is a separate interrupt for each encoder channel. Use interrupt channels 4400-4407 to respond to these interrupts for encoder channels 0-7 respectively.

Watchdog

The Quanser Q8 supports the use of the 32-bit general purpose clock, HARDWARE_CLOCK_1, as a watchdog timer. The timer may be programmed with any interval between 60 ns and 128 seconds. The board is capable of resetting the analog outputs to 0V and the digital outputs to tristate (pulled high by internal 47K resistive pullups) upon expiration of the watchdog timer. 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 resetting of the analog and digital outputs, check the "Set analog outputs at watchdog expiration" and "Set digital outputs on watchdog expiration" options in the HIL Initialize block parameters and set the analog and digital outputs on watchdog expiration to 0 V and 2 (tristate) respectively. Then place a HIL Watchdog block in the diagram.

When the watchdog functionality is used, the WATCHDOG pin will reflect the status of the watchdog timer. The WATCHDOG pin may be found on the CONTROL header on the Quanser Q8 terminal board. This pin is normally high. If the watchdog timer is allowed to expire, then this pin will go low. Once the watchdog has expired, further I/O is disabled until the watchdog state is cleared or the watchdog timer is stopped. The watchdog pin remains low after expiration until the watchdog is restarted or the watchdog is configured for other functionality, such as a PWM output or hardware timebase.

Hence, in Simulink models, the WATCHDOG pin will remain low after watchdog expiration even after the model is stopped, unless a HIL Watchdog Clear block is used to clear the watchdog state. Restarting the model causes the WATCHDOG pin to go high once more. These semantics make the WATCHDOG pin useful for ensuring product safety.

The fuse on the Quanser Q8 terminal board also acts as a watchdog in the sense that if the fuse blows, the analog outputs are reset to 0V and the digital outputs go tristate (pulled high by internal pullups). In this case, the model or application should be stopped and only restarted once the fuse has been replaced. This action of the fuse cannot be disabled.

Board-Specific Options

The Quanser Q8 card does not support any board-specific options.

Properties

The Quanser Q8 driver currently supports the following read-only properties:

Property

Type

Description

PROPERTY_INTEGER_VENDOR_ID

Integer

PCI vendor ID

PROPERTY_INTEGER_PRODUCT_ID

Integer

PCI device ID

PROPERTY_INTEGER_SUBVENDOR_ID

Integer

PCI subvendor ID

PROPERTY_INTEGER_SUBPRODUCT_ID

Integer

PCI subdevice ID

PROPERTY_STRING_MANUFACTURER

String

Manufacturer name

PROPERTY_STRING_PRODUCT_NAME

String

Product name

PROPERTY_STRING_MODEL_NAME

String

Model name

Targets

Target

Supported

Comments

QUARC Win32 Target

Yes

Fully supported.

QUARC Win64 Target

Yes

Fully supported.

QUARC Linux Nvidia Target

No

Not supported.

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

No

Not supported.

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

Yes

Last fully supported in QUARC 2018.

Rapid Simulation (RSIM) Target

Yes

Supported with no communication to the hardware.

Normal simulation

Yes

Supported with no communication to the hardware.

See Also

See Also

 

navigation bar