xPC Target    

Rapid Prototyping Process

Design and build a target application on a host PC, and then run and test the target application on a target PC. xPC Target functions include interactive control of the target application, acquisition of signal data, and tuning of parameters while running in real time.

The rapid prototyping process includes the following sequence of tasks:

  1. Create a Simulink and Stateflow model -- You create block diagrams in Simulink using simple drag-and-drop operations, and then you enter values for the block parameters and select sample rates. If you use continuous-time components, you also need to select an integration algorithm.
  2. Simulate the model in nonreal time -- Simulink uses a computed time vector to step the model. After the outputs are computed for a given time value, Simulink immediately repeats the computations for the next time value. This process is repeated until it reaches the stop time.
  1. Because this computed time vector is not connected to a hardware clock, the outputs are calculated in nonreal time as fast as your computer can run. The time to run a simulation can differ significantly from real time.

  1. Create an executable target application -- Real-Time Workshop, Stateflow Coder, xPC Target, and a C compiler create the target application that runs on the target PC. This real-time application uses the initial parameters from the Simulink model that were available at the time of code generation.
  2. Execute the target application in real time -- The target PC is booted using an xPC Target boot disk that loads the xPC Target real-time kernel. After booting the target PC, you can build and download a real-time application.
  1. xPC Target provides the necessary software that makes use of real-time resources on the target PC hardware. Based on your selected sample rate, xPC Target uses interrupts to step the model at the proper rate. With each new interrupt, the target application computes all of the block outputs from your model.

  1. Acquire signals -- Acquire signal data using xPC Target Scopes. You can create xPC Target Scopes and acquire data from the target application by
  2. Tune parameters -- You can tune parameters by

  Host-Target Communication xPC Target Embedded Option