Run Model on Simulink and Run controller on Microcontroller F28379D Texas Instrusment

4 visualizzazioni (ultimi 30 giorni)
Hello every body
My project need to selftest controller before upload firmware on hardware of sytems. So Could you help me how to Run model on Simulink get feedback signal to send to microcontroller F28379D.
On Microcontroller will setup controller to control model on Simulink.
Thank in advance!

Risposte (1)

Anudeep Kumar
Anudeep Kumar il 29 Lug 2025
Modificato: Anudeep Kumar il 29 Lug 2025
Hey @ha duc,
From your limited description of the goal you want to achieve what I can suggest from my understanding is to look into 'Hardware-in-the-Loop (HIL)' or 'Processor-in-the-Loop (PIL) Simulation. This is common for testing controllers before deploying them on real hardware.
For establisng communication between Simulink and F28379D, we can either use
External Mode (Real Time Testing):
  • 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.
SIL/PIL Manager
  • 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.
I am providing the links hereby for your reference. You can go through these detailed documentations and examples that can help you achieve your goal based on your requrements.
  • 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 :
Videos on PIL using MATLAB
I hope the above helps!

Prodotti


Release

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by