User`s guide

8 Targeting Tornado for Real-Time Applications
8-6
External Mode
Simulink external mode provides a mechanism to download new parameter
values to the executing program and to monitor signals in your model. In this
mode, the external link MEX-file sends a vector of new parameter values to the
real-time program via the network connection. These new parameter values
are sent to the program whenever you make a parameter change without
requiring a new code generation or build iteration.
Using VxWorks for signal monitoring is explained in the Chapter 5, “Data
Logging and Signal Monitoring.” See “C API for Signal Monitoring” on page 5-4
for more information.
The real-time program (executing on the VxWorks target) runs a low priority
task that communicates with the external link MEX-file and accepts the new
parameters as they are passed into the program.
Communication between Simulink and the real-time program is accomplished
using the sockets network API. This implementation requires an ethernet
network that supports TCP/IP. See Chapter 4, “External Mode,” for more
information on external mode.
Changes to the block diagram structure (for example, adding or removing
blocks) require generation of model and execution of the build process.
Configuring VxWorks to Use Sockets
If you want to use Simulink external mode with your VxWorks program, you
must configure your VxWorks kernel to support sockets by including the
INCLUDE_NET_INIT, INCLUDE_NET_SHOW,andINCLUDE_NETWORK options in your
VxWorks image. For more information on configuring your kernel, see the
VxWorks Programmer’s Guide.
Before using external mode, you must ensure that VxWorks can properly
respond to your host over the network. You can test this by using the host
command
ping <target_name>