User`s guide
Quick Start Tutorials
3-41
4 Define and assign two variables A and B in the MATLAB workspace as
follows:
A = 2; B = 3;
5 Open Gain block A and set its Gain parameter to the variable A as shown
below.
6 Similarly, open Gain block B and set its Gain parameter to the variable B.
When the target program is built and connected to Simulink in external
mode, you can download new gain values to the executing target program
by assigning new values to workspace variables
A and B, or by editing the
values in the block parameter dialogs. You explore this in “Part 4: Tuning
Parameters” on page 3-50 of this tutorial.
7 Verify correct operation of the model. Open the Scope blocks and run the
model. When
A = 2 and B = 3, the output looks like this.