User`s guide
Quick Start Tutorials
3-49
6 Open Scope blocks A and B. At this point, no signals are visible on the
scopes. When you connect Simulink to the target program and begin model
execution, the signals generated by the target program will be visible on
the scope displays.
7 The model itself must be in external mode before communication between
the model and the target program can begin. To enable external mode,
select
External from the simulation mode pull-down menu located on the
right side of the toolbar of the Simulink window. Alternatively, you can
select
External from the Simulation menu.
8 Reopen the External Mode Control Panel and click Connect. This
initiates a handshake between Simulink and the target program. When
Simulink and the target are connected, the
Start real-time code button
becomes enabled, and the label of the
Connect button changes to
Disconnect.
9 Click the Start real-time code button. The outputs of Gain blocks A and
B are displayed on the two scopes in your model. With
A = 2 and B = 3,
the output looks like this.
Having established communication between Simulink and the running target
program, you can tune block parameters in Simulink and observe the effects
the parameter changes have on the target program. You do this in the next
section.