User`s guide

Using Proc essor in the Loop
Using Processor in the Loop
Processor in the loo p provides one pow erful verication capability in your
development process. This section discusses the following PIL topics:
In this section...
“Processor-in-the-Loop O verview” on pag e 4-3
“PIL B lock” on page 4-6
“PIL Issues” on page 4-6
“Creating a n d Using PIL Blocks” on pag e 4-8
Processor-in-the-Loop Over view
Processor-in-the-loop (PIL) cosimulation is a technique designed to help you
evaluate how well a candidate algorithm, such as a control system, operates
on the actual processor selected for the application.
The term cosimulation reects a division of labor in which Simul ink software
models the plant, while code generated from the controller subsystem runs on
the a ctual processor hardware.
During the Real-Time Workshop Embedded Coder software code generation
process, you can create a PIL block from one of several Simulink software
components including a model, a subsystem in a model, or subsystem
in a library. You then place the gene rated PIL block inside a Simulink
software model that serves as the test harness and run tests to evaluate the
processor-specic code execution behavior.
Why U se Cosimulation?
PIL cosimulation is particularly useful for simulating, testing, and validating
a controller algorithm in a system comprising a plant and a controller. In a
classic closed-loop simulation, Simulink software and Stateow
®
model such
a system as two subsystems with the signals transmitted betw een them, as
shown in the following block diagram.
4-3