Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 218468

Forum Post: RE: CCS/TMS320F28379D: PID Controller

$
0
0
Dear Mohammad, Glad it helped. 1. The ".dclfuncs" section is defined in the assembly modules of DCL. In this case I used PID_C3 and Clamp_C2, both of which are inline C functions in DCLF32.h, so the dclfuncs section was never defined. All the code appears in one of the .text sections. The advantage of having DCL code in a separate named section is you can place it in a specific memory block in the linker command file, for example if your program is in flash and you want to have the controller in faster RAM memory, but in this case it's not necessary. 2. Correct. 3. Assuming the ADC is configured in 12-bit mode (as it is in this example) the result lies in the range 0 to 4095. The PID controller expects to see a normalized feedback (yk) in the range -1 to +1, so this line of code first offsets the ADC result to make it bi-polar, then scales it to the required range. 4. I understand the confusion. ControlSUITE is no longer being updated - for some time, any new content has been going into C2000Ware and the relevant SDK (MCSDK for motor control). http://www.ti.com/tool/C2000WARE-MOTORCONTROL-SDK As of today, the MCSDK does not use the DCL controllers, though it may well do so in future. You can take your pick about which approach to follow but I think if it were me I would go with whatever is in MCSDK today. Feel free to open a new post if you have further questions on this topic. Regards, Richard

Viewing all articles
Browse latest Browse all 218468

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>