User`s guide
8 Graphical User Interfaces
8-10
For the PumpSwitch and ValveSwitch blocks, enter the following tags
respectively:
xPCTag(2)=pump_switch;
xPCTag(1)=drain_valve;
To create the To xPC blocks in an user interface model for a block with four
properties, use the following syntax:
xPCTag(1,2,3,4)=label_1 label_2 label_3 label_4;
To create the To xPC blocks for the second and fourth properties in a block
with at least four properties, use the following syntax:
xPCTag(2,4)=label_1 label_2;
6 From the File menu, click Save as. Enter a filename for your model. For
example, enter
xpc_tank1
You next task is to mark block signals if you have not already done so, and then
create the user interface template model. See “Marking Block Signals” on
page 8-10 and “Creating a Custom Graphical Interface” on page 8-3.
Marking Block Signals
Tagging signals in your Simulink model allows the function xpcsliface to
create From xPC Target interface blocks. These interface blocks contain the
signals you connect to display devices in your user interface model.
After you create a Simulink model, you can mark the block signals. This
procedure uses the model
xpc_tank1.mdl (or xpctank.mdl) as an example. See
“Creating a Target Application Model” on page 8-8.