The Simulink 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; Trying To Start The Qbot Model Results In The Error "Unable To Locate The Dynamic Link Library Or Shared Object - Quanser qbot User Manual

Table of Contents

Advertisement

Quanser Qbot: User Manual
6.5. The Simulink 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".
1. The maximum sample rate recommended for the Qbot is 500 Hz (0.002 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. Try reducing the model sample rate
in the menu QUARC\Options\Solver by increasing the "Fixed-step size (fundamental
sample time)" parameter.
2. The HIL Read Write block and the VAL Read Sensors block should only be used once in
a diagram. These blocks perform large data transfers between the Qbot computer and the
controllers, so placing more than one of these blocks will cause multiple reads to be per-
formed in the same sample instant, which is unnecessary. Use only one HIL Read Write or
VAL Read Sensors block for the entire model.
3. To determine the execution time of blocks or subsystems within the model, use the Com-
putation 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-resolu-
tion 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.
6.6. Trying to start the Qbot model results in the error
"Unable to locate the dynamic link library or shared
object."
1. This error indicates that the Qbot driver is not found on the target. Make sure that the
model target type is set to Linux Verdex by navigating to the QUARC menu QUARC\Op-
tions\Real-Time Workshop pane and changing the System target file to quarc_linux_ver-
dex.tlc. Open a console through the QUARC menu QUARC\Console for all, and verify that
the console window displays the target IP of your Qbot in the window title.
Document Number: 830  Revision: 7  Page: 21

Advertisement

Table of Contents
loading

Table of Contents