User`s guide

Polling M o de
Use the fastest available computer hardware Ensure that the CPU with
thehighestclockrateavailableisusedforagivenPCformfactor.Forthe
desktop form factor, this would mean a clock rate above 3 GH z; for a mobile
application, e.g., using the PC/104 form factor, this would mean a clock rate
above 1 GHz. Executing
xpcbench at the MATLAB prompt gives a relative
measure of CPU performance when running typical target applications.
Use the low est latency I/O hardware and drivers available Many xP C
Target applications communicate with hardware through I/O hardware
over either an ISA or PCI bus. Because each register access to such I/O
hardware introduces a comparably high latency time (~1 µs), the use of the
lowest latency hardware/driver technology available is crucial.
The base sample time is about 50 µs or less The time additionally
assigned to model code execution in polling mode is only about 8 µs. If the
givenbasesampletimeofthetargetapplicationexceedsabout5s,the
possible percentage gain is rather small. O ther optimization technologies
might have a bigger impact on increasing performance.
Setting the Polling Mode
Polling mode is an alternative to the default interrupt mode of the kernel.
This means that the kernel on the bootable m edia created by the GUI allows
running the target application in both modes without the necessity to use
another boot disk.
By default the target application executes in interrupt mode. To switch to
polling mode, you n eed to pass an option to the System target file command.
The f ollow ing exam ple uses
xpcosc.mdl.
1 In the Simulink window, and from the Tools menu, point to Real-Time
Workshop,andthenclickOptions.
The Configuration Parameters dialog box opens.
2 In the left pane, click the Real-Time W orkshop node.
12-7