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.

LAUNCHXL-F28379D: F28379D Launchpad: PID Control Example/Resources

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: C2000WARE

Hello App. engineer,

Where can I find a PID control code example using F28379D Launchpad? I can't seem to find any application notes or tuning guides about the device. Also, I saw an example in Controls/DCL/Example/Example_F28069_PID.c. I am assuming this is device-specific. Can I reuse this code? Is the only thing I have to change is device initialization? 

Regards,

Jin

  • Jin,

    The PID implementation in DCL library is independent to device, as long as your device has a floating point unit (FPU). The example is specific to device because the device initialization is device specific. You can refer to the "control_Isr" function on how to use the PID controller in DCL in your end applicaiton software.

    For device specific initialization example, please refer to driverlib example in "C2000Ware_Install_Dir\driverlib\f2837xd\examples".

    Note that since you are using launchpad as hardware, make sure to add the pre-defined symbol "_LAUNCHXL_F28379D" in imported example project.

    Han

  • Hello Han,

    I see that the in the Example_F28069_PID.c calls an external DCL_runPID_C4, and in the same DCLF32.h file, I also see DCL_runPID_C3 and  DCL_runPID_C2 defined. May I ask what are the differences? and why the C4 function is external while C3 and C2 functions are written in the .h file?

    Thank you

    Regards,

    Jin

  • Jin,

    The C4 is implemented in assembly while the C2 and C3 are implemented as inline C function. For detailed topology of each implementation, please refer to the DCL user's guide in C2000WARE_INSTALL_DIR\libraries\control\DCL\c28\docs.

    Han