Page 1 of 1

Doubt with variables of the PID function

Posted: Mon May 30, 2022 8:00 pm
by OderlandoAbril
Hello. I'm trying to do some tests using the PID control and I have some doubts. I downloaded the PID example from https://www.matrixtsl.com/wikiv7/index. ... _%28DSP%29 to use it. I want to build a PID control that I can change the variables (P), (I) and (D) without having to go to Flowcode and rewrite the microcontroller with the new values. My question is: how can I use variables to do this? In the properties box I could not use variables, only numbers, as shown in the screenshot below. I would like help with this.

Re: Doubt with variables of the PID function

Posted: Tue May 31, 2022 1:01 am
by chipfryer27
Hi

If I understand your request correctly, you wish to change the values of P,I and D during program execution? If so you can simply drag a component macro on to your chart, then select DSPPIDControl and from the submenu select ChangePID.

You can then use variables to set the parameters.

Regards