xPC Target    

Creating a User Interface Model

A user interface model contains components from the Dials & Gauges Blockset and xPC Target interface blocks. It functions as a user interface that allows you to view signals with gauges and change parameters using dials.

After you tag block properties and block signals, you are ready to generate the user interface template model containing xPC Target interface blocks. These blocks connect your user interface model with your target application.

This procedure users the Simulink model xpc_tank1.mdl as an example, and assumes you have tagged the block properties and block signals. See Marking Block Parameters and Marking Block Signals.

  1. In the MATLAB Command Window, type
  1. A window with the Simulink model xpc_tank1.mdl opens.

  1. Type
  1. A new Simulink window opens with the user interface template model.

  1. From the Simulation menu, click Simulation parameters. On the Simulation Parameters dialog box, click the Solver tab.
  2. In the Stop time box, enter inf. From the Type list, select Fixed-step. From the solver list, select discrete (no continuous states). In the Fixed step size box, enter auto.
  1. Your Solver page should look similar to the one shown below.

Your next task is to add dials and gauges, and connect them to the xPC Target interface blocks. See Adding Dials & Gauges Blockset.


  Description of the User Interface Model Adding Dials & Gauges Blockset