Embedded Target for Motorola MPC555    

How Cosimulation Works

This figure illustrates how the plant (P) and controller (C) components interact in a PIL cosimulation.

In a PIL cosimulation, the Real-Time Workshop Embedded Coder generates efficient code for the control system. This code runs (in simulated time) on a target board using the intended microcontroller. The plant model remains in Simulink without the use of code generation.

During PIL cosimulation, Simulink simulates the plant model for one sample interval and exports the output signals (Yout of the plant) to the target board via a communications link. When the target processor receives signals from the plant model, it executes the controller code for one sample step. The controller returns its output signals (Yout of the controller) computed during this step to Simulink, via the same communications link. At this point one sample cycle of the simulation is complete and the plant model proceeds to the next sample interval. The process repeats and the simulation progresses.

To learn about PIL cosimulation though hands-on experience, see Tutorial 1: Building and Running a PIL Cosimulation.


  Overview of PIL Cosimulation Tutorial 1: Building and Running a PIL Cosimulation