This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28379D: Implementation of PI controller in c2000 micro controller

Genius 9880 points
Part Number: TMS320F28379D


Hi Team,

We have received inquiry that customer is encountering error when implementing the PI controller in c2000 micro controller. Below is the details.

"

I am trying to integrate PID library in simulink for generating code for c2000 micro controller but there are some functionality limitation in simulink restricting us from using the .asm file for PI controller.

Is there any sample C code for implementation of PI controller in c2000 micro controller ? (The only related information that I found is: C28x and CLA control routine
https://e2e.ti.com/support/microcontrollers/c2000/f/c2000-microcontrollers-forum/902023/tms320f28069-c28x-and-cla-control-routine )

I am actually trying to implement PI controller action in CLA of the controller. When I am trying to generate code for the board, it gives many errors..mainly due to the case that CLA does not have access to global variables and all..

I included the .asm file in the build option and used System Output block from simulink coder and added the function call to be implemented in the CLA. When code was generated, it said the variables used in the function call was not defined, even though all of them were defined in the system.

And when I tried to use the PID controller library which is available with the Embedded coder add on for C2000 micro controller package, the error that I got was, it was accessing a variable which was defined in CPU and not in CLA, which made it not defined.

When I tried to use the IQmath library to implement PI controller by modelling each block, I got error that, the IQ functions were not defined.

These are some of the errors i got while trying different methods for implementing the PI controller in CLA
"

Regards,

Maynard