User`s guide
12 Execution Modes
execution of the target application, depending on the state of the digital input
signal. You can either use a hardware switch connected to the board-specific
input pin or you can generate the signal by o ther means. For example, you
could use another digital I/O b oard in the host m achine and connect the
two boards (one in the host, the other in the target) over a couple of wires.
You could then use the Data Acquisition Toolbox™ product to drive the
corresponding TTL output pin of the host board to stop the target application
execution from within the MATLAB interface.
Generally, you can use the same software/hardware setup for passing
other information back a nd forth during run time of th e target ap p lication.
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 executi on 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.
The minimum achievable base sample time for model
Minimal (type h elp
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 inte gra t ion a lgorithm is 4 µs with signal loggin g 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 two 16 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,
whichisusedinconjunctionwithsome recently developed and heavily
optimized (lowest latency) xPC Target drivers for this particular b oard.
12-14