Hi,
I would Like to implement 3 PI loops with CLA. The loops are sequential that is output of 1st loop is input to 2nd and output of 2nd is input to 3rd.
I have created 3 instances of DCL_PI_CLA and initialized all the instances with the values for each loops
Question 1:
Can I call the function "DCL_runPI_L1" 3 times in one Task? or should it be 3 different tasks Task 1, Task 2 and Task 3? I have tried both but either ways I can only see the first loop working with uk1 varying its value depending on change in rk1. uk2 and uk3 are initially zero and then directly jump to 1 (when rk1 is changed) and do not change at all after that. uk1 gradually varies and reaches 1.
uk1 = DCL_runPI_L1(&pi1, rk1, yk1);
uk2 = DCL_runPI_L1(&pi2, rk2, yk2);
uk3 = DCL_runPI_L1(&pi3, rk3, yk3);
Question 2:
I want them to run the CLA at a frequency depending on the EPWM2 module so I have the Trigger source defined as below
CLA_setTriggerSource(CLA_TASK_1, CLA_TRIGGER_EPWM2INT);
CLA_setTriggerSource(CLA_TASK_2, CLA_TRIGGER_EPWM2INT);
CLA_setTriggerSource(CLA_TASK_3, CLA_TRIGGER_EPWM2INT);
Is there a way to trigger 2nd loop when 1st loop is completed and similarly trigger 3rd loop when 1st loop has completed?
Question 3:
Even when CLA is computing and I can see uk1 values varying in the watch window, the debug window shows CLA is suspended. Is this how it is supposed to be?


If I hit the RUN button I get below errors in the console

Question 4:

Is there a diagram for DCL_PI_L1 architecture alone? Some of the variables used in L1 functions code is not found in this diagram, for example i6. I am trying to find the variable that I need to assign the integrator gain which will be multiplied with the previous integrator output.
Integrator output += Gain * Previous Integrator Output
where Previous Integrator Output = Error * KI (Error = rk - yk)
Could you point me to the variable to which I should assign this "Gain" value ? Is it i6, i10 or something else?
Regards,
Rashmitha

