Doubt with variables of the PID function

For general Flowcode discussion that does not belong in the other sections.
Post Reply
OderlandoAbril
Posts: 10
http://meble-kuchenne.info.pl
Joined: Tue Apr 06, 2021 6:06 pm
Has thanked: 2 times
Been thanked: 1 time

Doubt with variables of the PID function

Post 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.
Attachments
Captura PID.PNG
Captura PID.PNG (66.75 KiB) Viewed 737 times

chipfryer27
Valued Contributor
Posts: 1109
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 278 times
Been thanked: 396 times

Re: Doubt with variables of the PID function

Post 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

Post Reply