User`s guide

Polling Mode
10-13
Generally, you can use the same software/hardware setup for passing other
information back and forth during run time of the target application. It is
important to understand that any additional feature beside signal logging has
to be implemented at the model level, and it is therefore the user’s
responsibility to optimize for the minimal additional latency the feature
introduces. For example, being able to interactively stop the target application
execution is paid for by the introduction of an additional 1 µs latency necessary
to read the digital signal over the digital I/O board. However, if you need to
read digital inputs from the plant hardware anyway, and not all lines are used,
you get the feature for free.
Polling Mode Performance
This is preliminary information. All benchmarks have been executed using a
1 GHz AMD Athlon machine, which is the same machine that is at the top of
the list displayed by
xpcbench.
The minimum achievable base sample time for model
Minimal (type help
xpcbench
in the MATLAB Command Window for further information) is 1 µs
with signal logging disabled and 2 µs with signal logging enabled.
The minimum achievable base sample time for model
f14 (type help xpcbench
for further information in the MATLAB window) using an
ode4 fixed-step
integration algorithm is 4 µs with signal logging disabled and 5 µs with signal
logging enabled.
A more realistic model, which has been benchmarked, is a second-order
continuous controller accessing real hardware over two16 bit A/D channels and
two 16 bit D/A channels. The analog I/O board used is the fast and low-latency
PMC-ADADIO from
http://www.generalstandards.com, which is used in
conjunction with some recently developed and heavily optimized (lowest
latency) xPC Target drivers for this particular board. The minimum achievable
base sample time for this model using an
ode4 fixed-step integration algorithm
is 11 µs with signal logging disabled and 12 µs with signal logging enabled.
This equals a sample rate of almost 100 kHz. The achievable sample time for
the same model in interrupt mode is ~28 µs or a sample rate of ~33 kHz. For
this application, the overall performance increase using polling mode is almost
a factor of 3.