Download An Integrated, Modular Simulation System for Education and

Transcript
Real Time Workshop
To generate the final executable program a Simulink model must include the
source code for all of the user supplied S-functions. Any custom functions that will run in
the Simulink environment can be included in the auto-coding to run in a stand alone
application.
Stand-alone Code
The real-time workshop code generator creates an executable that runs in the 32
bit DOS window of Windows 98. Using the TCP/IP connection, two forms of IO are
being provided that Mathworks didn t supply. There was no provision for keyboard input
to a real-time workshop application so modifying the program as it was running was
limited to using the supplied external mode interface which allows one process to run
Simulink coupled to another process running the real time application. This allows
Simulink to be linked with running simulation code providing the ability change control
parameters inside the simulation while the program is running. The user simply changes
the values in the Simulink block and the value is immediately updated in the running
program. This allows different control gain sets to be used during the simulation or
parameters such as time delay to be added to the simulation to demonstrate the resulting
deterioration in handling qualities. This also allows a separate computer to provide a
instructor station to control pilot in the loop simulations. Graphics is the second form
of output that is not supported by the RTW coder. Graphics has been in two forms: 1) an
interface to the World Up VR viewer was adapted to run through the Simulink
environment.and, 2) PhEagle I graphics are being added through the network capability
using the existing TCP/IP sockets. Since the graphics computers only require a state
vector providing position and orientation information, the Simulink model can use the
39