MATLAB: How to run PIL (Processor-in-the-Loop) with custom target code

Embedded IDE Link CCEmbedded IDE Link MUEmbedded IDE Link TSEmbedded IDE Link VS

The Embedded Link products provide a convenient way to generate a PIL block from a masked subsystem in a model. However, I would like to know how I could incorporate my own custom target code instead of using the generated code.

Best Answer

Support for custom code with PIL is via integrating the custom code into Simulink and then running PIL as normal.
Some techniques to integrate the custom code into Simulink are:
- Legacy code tool (LCT)
- Hand written S-function
- S-function Builder
This will enable Embedded Link VS to do all the data I/O with the DSP board
as normal.