Download Real-Time Workshop®

Transcript
1
Introduction to the Real-Time Workshop
data to the MAT-file variable rt_Stick_input during a run of the
executable program.
5 Click the Apply button.
6 Configure the Pilot G Force and Angle of Attack Scope blocks similarly,
using the variable names Pilot_G_force and Angle_of_attack.
7 Save the model.
Logging Simulation Data
The next step is to run the simulation and log the signal data from the Scope
blocks:
1 Open the Stick Input, Pilot G Force, and Angle of Attack Scope blocks.
2 Run the model. The Scope blocks display.
3 Use the whos command to observe that the matrix variables Stick_input,
Pilot_G_force, and Angle_of_attack have been saved to the workspace.
4 Plot one or more of the logged variables against simulation time. For
example,
plot(tout, Stick_input(:,2))
Logging Data from the Generated Program
Since you have modified the model, you must rebuild and run the f14rtw
executable in order to obtain a valid data file:
1-54