User`s guide
10 Graphical User Interfaces
4 In the MATLAB interface, run the function xpcsliface('model _name') to
createtheuserinterfacetemplatemodel. This function generates a new
Simulink model containing only the xPC Target interface blocks (To xPC
Target and From xPC Target) defined by the tagged block parameters and
block signals in the target application m odel.
5 To the user interface template model, add Simulink interface blocks from
add-on products (Simulink 3DAnimation,AltiaDesign).
• You can connect Altia blocks to the xPC Target To PC Target interface
blocks. To x PC Target blocks on the left should be connected to control
devices.
• You can connect Altia and Simulink 3D Animation blocks to the xPC
Target From PC Target interface blocks. From xPC Target blocks on the
right should be connected to the display devices.
You can position these blocks to your liking.
6 Start both the xPC Target application and the Simulink user interface
model that represents the xPC Target application.
To xPC Target Block
This block behaves as a sink and usually receives its input data from a
control device. The purpose of this block is to write a n ew v a lue to a spe cific
parameter on the target application.
This block is im plemented as a MATLAB S-function. The block is optimi zed
so that it only changes a parameter on the target application when the input
value differs from the value th a t existed at t h e last tim e step. This blo ck
uses the parameter downlo ading feature of the xPC Target command-line
interface. This block is available from the xpclib/Misc block sublibrary. See To
xPC Target in the xPC Target I/O Reference for further configuration details.
10-4