User`s guide

Polling M o de
rates, the CPU will most likel y overload for the given base sample time. As an
important consequence, polling mode is only a feasible alternative to interrupt
mode if the model has a single rate or if it can be converted to a single-rate
model. A s ingle-rate model implies continuous states o nly, discrete states
only, or mixed continuous and discrete states, if the continuous and d iscrete
subsystemshavethesamerate. UsetheSimulinkFormat > Sample
time color feature to check for the single rate requirement. Additionally,
set the tasking mode property in the Simulation menu Configuration
Param ete rs > So lve r pane to
SingleTasking to avoid a possible switch to
multitask in g mode. For more in f o rm a t ion on single-tasking mode compared to
multitasking mode, see the Real-Time Workshop User’s Guide documentation.
I/O Drivers Using Kernel Timing Information Cannot Be Used
Within a Model
Some xPC T arg et d rivers use timing information e xported from the kernel
in order to run properly, for example, for the detection of time-outs. Because
the standard timing engine of the kernel is not running during the entire
target application exe cu tion in pollin g mode, timing information pass ed back
to the drivers is incorrect. Therefore, you cannot use drivers importing the
header file
time_xpcimport.h. This is a current restriction only. In a future
version of polling mode, all drivers will make use of the Pen tiu m counter for
getting timing information instead.
Controlling the Tar ge t Application
As mentioned, there is no way to interact with the running target application
in polling mode. This is especially restrictive for the case o f stopping the model
execution before the application has reached the stop time that was defined
before the execution started. Because polling mode tries to be as optimal as
possible, any rapid-prototyping feature except signal logging is disabled. But
because I/O driver blocks added to the model are fully functional, you can use
I/O drivers to get to a minimal level of interactivity.
Stopping a target application using polling mode You can use a low-latency
digital input driver for the digital PCI board in your model, which reads in a
single digital TTL signal. The signal is TTL low unless the model execution
should be stopped, for which the signal changes to TTL high. You can connect
the output port of the digital input driver block to the input port o f a Stop
simulation block, found in the standard Simulink block library. This stops the
12-13