Quanser Q8
This card is no longer available. For a newer card with similar capabilities, visit the Quanser website for the Quanser QPIDe.
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 .
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 with the hil_set_clock_mode function.
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 using the hil_set_analog_output_ranges function by setting the maximums and minimums arguments to the appropriate value of each channel indicated in the analog_channels argument.
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 using the hil_set_digital_directions function.
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 using the hil_set_digital_directions function.
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, use the hil_set_encoder_counts, hil_set_encoder_quadrature_mode and hil_set_encoder_filter_frequency functions respectively.
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.
Set the PWM output mode to the desired output mode using the hil_set_pwm_mode_c function. The Quanser Q8 supports all the PWM output modes: duty cycle, frequency or period. See the PWM Output Configurations page for details on these modes. After setting the mode, use the hil_set_pwm_frequency or hil_set_pwm_duty_cycle functions to set 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, use the hil_watchdog_set_analog_expiration_state and hil_watchdog_set_digital_expiration_state functions to set the analog and digital outputs on watchdog expiration to 0 V and 2 (tristate) respectively. Then start the watchdog using hil_watchdog_start. Be sure to reload the watchdog periodically using hil_watchdog_reload to prevent the watchdog timer from expiring.
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, the WATCHDOG
pin will remain low after watchdog expiration even after the model is stopped, unless the
hil_watchdog_clear function is used to clear the watchdog state. 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 |
---|---|---|
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. |
|
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
Copyright ©2023 Quanser Inc. This page was generated Thu 05/04/2023. Submit feedback to Quanser about this page.