Figure 4.1: The QBot 2 DAQ mounting screws
Q3
The QBot 2 sensors are not being read correctly or they are stuck at some constant value
Using the
HIL Read
block, output all possible channels. Check these outputs using scopes and displays, and
determine if the problem lies with a particular sensor, or set of sensors, or if the issue is global across all
sensors.
Q4
The
Simulink
r
model appears to run slowly (i.e., the simulation time runs slower than actual time), or the
console displays the message
Sampling rate is too fast for base rate
(a) The maximum sample rate recommended for the QBot 2 is
1000
Hz
(
sampletime
0
.
001
s
)
. However, if
there are complex calculations (such as image processing) performed within the model, then this could
potentially limit the sample rate of the model (suggested sample rate of 100
Hz
or 50
Hz
). Try reducing the
model sample rate in the menu
QUARC
|
Options
|
Solver
by increasing the
Fixed-step size (fundamental
sample time)
parameter.
(b) To determine the execution time of blocks or subsystems within the model, use the Computation Time
block found in the
QUARC library
|
Sources
|
Time
. This block outputs the computation time of a function
call subsystem, measured using an independent high-resolution time source. Blocks can be placed inside
a function call subsystem and connected to the
Computation Time
block to determine their execution time
during each sample instant. This helps identify the bottlenecks in the model (blocks/subsystems with the
highest execution time) and can identify blocks/subsystems whose computation time is greater than the
sample time of the model. Try increasing the sample time of those blocks whose computation time is
greater than the sample time of the model so that the blocks run in a slower rate thread.
(c) If you are using image processing blocks, ensure that they are only executed when there is new image
data available or at a slower rate than the image acquisition rate. Otherwise, the embedded computer
is spending time processing image data that has already been processed, which can cause the model's
computation time to increase undesirably. For complex image processing, consider lowering the rate of
the image processing blocks and/or downsampling the source images to a lower resolution to speed up
processing time.
(d) If you are using image processing blocks, ensure that signal duration is set to 1 by going to
Tools | External
Mode Control Panel | Signal & Triggering | Duration
menu on the model (The default value is 10000).
Q5
Trying to start the QBot 2 model results in the error
Unable to locate the dynamic link library or shared object
This error indicates that the QBot 2 driver is not found on the target. Make sure that the model target type is set
to quarc_linux_duovero by navigating to the QUARC
r
menu
QUARC
|
Options
|
Code Generation
pane and
QBOT 2 - User Manual
24