xPC Target    

Running a Target Application with a User Interface Model

After you create an xPC Target application, download that application to the target PC, and create a Simulink user interface model, you are ready to use the user interface model as a graphical interface to the target application. See Creating a Target Application Model and Creating a User Interface Model.

  1. In the MATLAB Command Window, type
  2. Type
  1. The target application starts running in real time on the target PC.

  1. In the Simulink window for the user interface model, from the Simulation menu, click Normal, and then click Start.
  1. The user interface model begins a simulation in nonreal time. You should observe graphical information made available through the Dials & Gauges components. For example, the tank icon shows the water level rising.

    When starting the simulation of your GUI interface, you might get an error with one or more of the To xPC Target or From xPC Target blocks. To correct this problem, create a temporary GUI using the function xpcsliface('xpc_tank1'), delete the problem blocks, and then copy new xPC Target interface blocks from the temporary GUI. Save the model and restart the simulation.

  1. Click the pump switch or drain valve buttons, or click-and-drag the slider knobs to change parameters to new values.


  Creating a Target Application Embedded Option