필터 지우기
필터 지우기

MATLAB to TI C2000 F28379D data exchange

조회 수: 49 (최근 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개)

Community Treasure Hunt

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

Start Hunting!

Translated by