MATLAB to TI C2000 F28379D data exchange

23 ビュー (過去 30 日間)
Johnathan Williams
Johnathan Williams 2020 年 9 月 29 日
コメント済み: Johnathan Williams 2020 年 10 月 1 日
I would like to send and receive data between MATLAB and a TI C2000 F28379D controller. More specifically the F28379D is to control and monitor a circuit but will also require comparisons with previously aquired calibration data to help in the control of the output signal, hence I am looking for near real-time data flow from the controller to MATLAB and for MATLAB to be able to change a variable/register in the controller if needed. Is it possible to accomplish this via an I2C command or will I need to find another means to accomplish this? Eitherway I am stuggling with setting up the communication path and could some guidance on how to accomplish this.

採用された回答

Sumith Sekharan
Sumith Sekharan 2020 年 10 月 1 日
To communicate with Simulink/MATLAB from F28379D Launchpad, you can use the USB serial interface available on the hardware. For logging and tuning we can use 2 methods:
  1. External mode: https://www.mathworks.com/help/releases/R2020b/supportpkg/texasinstrumentsc2000/ug/parameter-tuning-and-signal-logging-with-serial-external-mode.html
  2. If your algorithm is running at fater rate like 50 usec, we have a custom serial protocol to log and tune signals. This method is explained in this video: https://www.mathworks.com/matlabcentral/fileexchange/61420-dc-dc-buck-converter-example.
Hope this helps, let us know.
Thanks,
Sumith
  1 件のコメント
Johnathan Williams
Johnathan Williams 2020 年 10 月 1 日
Thank you for the reply- I have been able to establish the external mode communications with Simulink, and originally used 'to' and 'from workspace' functions for the data exchage, but this only uploaded values at the begining of the simulation and then logged only some of the final output values at the end. I am looking to continuously read an input value of the F28379 in Matlab, compare it to a calibration matrix that I will load in to a Matlab program, and then change a pulsewidth value of an output of the F28379 program, if needed.
Is there a way to have more continuous updates/data exchange between the F28379 microcontroller and a program written in Matlab?

サインインしてコメントする。

その他の回答 (0 件)

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by