User`s guide
Sample Time Too Fast
5-5
Sample Time Too Fast
During a run, you might not see any output in the Scope window. This could
indicate that the sample time is too small. In the MATLAB Command Window,
type
rtwho
Check the value for MATLAB performance. A value less than 80% indicates
that your sample time might be too small.
In general, we recommend that you start by choosing a slow sample rate. For
example, select a sample time of
0.01 second, and confirm that your system
runs correctly and plots are displayed. Should you select a sample rate that
exceeds the capability of your computer, an error message is displayed and
real-time execution is terminated. If this occurs, select a slower sample rate.
Then rebuild the model, connect to the target, and start the real-time
application again. You must rebuild the real-time application after changing
the sample time.
Check the MATLAB performance value returned when you type
rtwho. If
MATLAB performance is in the range of 98% or so, then consider decreasing
your sample time by one order of magnitude.
If you notice either slow updates of Scope blocks or a complete failure to plot
data in the Scope blocks, you might be reaching the upper threshold for the
sample rate on your hardware. Plotting data has a lower priority than
execution of your real-time application.