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.

TMS320F280025C: How to Implement linear PI controller (Digital control library) using the syscfg in main.c

Part Number: TMS320F280025C
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

Dear sir,

I am trying to implement the PI controller in PSFB using syscfg as screenshot given below.

After adding the controller using syscfg, how to assign the reference, feedback variable, and output variable in main.c file.

Regards

 

  • Hi Ajeet, 

    The SysConfig GUI in this case would automatically generate board.c/h and c2000ware_libraries.c/h based on the added items with functions to initialize them. In your case, please add C2000Ware_libraies_init to main.c that would initialize the PI struct named "myCONTROLLER0". Sysconfig instructions could be also found here.

    From there, you could use function "DCL_runPI_xx" based on the controller configuration you desire and assign error, feedback and output. For different controller configurations we offer, please refer to the "DCL User's Guide" located in C2000Ware Directory/libraries/control/DCL/c28/docs. We also offer examples that demonstrate DCL functions in practice under the same directory.

    Hope this helps,

    Sen Wang

  • Thanks for your help;

    Using DCL in syscfg, PI controller is easily implemented. 

    Regards

    Ajeet