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.

Compiler/TMS320F28377S: Regarding CCS Code

Part Number: TMS320F28377S

Tool/software: TI C/C++ Compiler

Dear all,

I am trying to develop a controller which have loops.  I have some issues with the code.

How to write code for multiple loops? Can anybody tell me where my mistake is?

Thanks for your time and assistance.

Ts =0.0001  /////sampling time

Tm = (10000/Wr);

Te = (1.5*Mfif*15);   


Ws= ((Ts/(J+Ts*40))*(Tm-Te+(40*314)))+Ws0*(0.4/(0.4+Ts*40));

if(Ws > 318)
{
Ws = 318;
}
if(Ws < 310)
{
Ws = 310;
}

Ws0 = Ws;
Te0 = Te;

///////////////////////////////////////

Qs = (-1.5)*(2*Ws*Mfif);

Mfif=Mfif0+(Ts/5050)*(15000-Qs+Dq*(Vref-325));

Qs0 = Qs;

Mfif0=Mfif;

E = ((Ws)*(Mfif));