- External Mode allows you to run the controller on the F28379D and the plant on Simulink, exchanging data in real time.
- You can open your controller model.
- Go to Model Settings > Hardware Implementation and select TI F2837xD.
- Set up External Mode parameters (COM port, baud rate).
- Use blocks like Serial Send/Receive or SCI Transmit/Receive for data exchange.This is based on what your model is like and what data you wnat to transmit and recieve. This can vary model to model.
- With Embedded Coder, you can run software-in-the-loop (SIL) and processor-in-the-loop (PIL) simulations of your model.
- These simulations generate source code for either the top model or part of the model.
- A SIL simulation compiles and runs the generated code on your development computer.
- A PIL simulation cross-compiles source code on your development computer, and then downloads and runs the object code on a target processor or an equivalent instruction set simulator.
- Processor in the Loop Simulation documentation: This link has an overview , numerous examples and description of various functions you can use:
- External Mode Simulation : These links explains what External mode is and some examples on how to use it :
- https://www.youtube.com/watch?v=OQIiyixlspA&ab_channel=MATLAB
- https://www.mathworks.com/videos/processor-in-the-loop-simulations-with-simulink-and-multi-ide-pil-testing-in-iso-26262-projects-1648539522739.html
- https://www.mathworks.com/videos/processor-in-the-loop-simulations-with-simulink-and-multi-ide-getting-started-1648538227662.html