LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pid without toolkit

Solved!
Go to solution

Hi!

I need to implement a temperature control by changing the voltage of a power supply connected to a heater.
I don't have PID toolkit, but I know how PID theorically works.
Attached: VIs (Untitled 1 the principal one) 
Any suggestion, help or hints are appreciated.

Thank you

0 Kudos
Message 1 of 14
(11,828 Views)
0 Kudos
Message 2 of 14
(11,825 Views)
Solution
Accepted by topic author ufo900

Hi ufo,

 

see here for the "Simple PID" example that NI once used to ship with LabVIEW...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 14
(11,816 Views)

well thank you 🙂

i'm almost new programming labview.

Any suggestion how to implement all that into the program attached?

Really thank you

0 Kudos
Message 4 of 14
(11,812 Views)

Hi ufo,

 

the SimplePID is as simple to use as its name implies: all it needs are PID parameters and the current value of the process variable and it will output the set value...

There's an example in the mentioned ZIP file included!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 14
(11,806 Views)

well ok, but i don't understand one thing:

i have to set temperature by a determined wave/value, but i need to control the voltage to do that.

how to solve? I mean.. the setpoint is temperature, process value is temperature, but the output of the pid how can it be relationed to the voltage?

Thank you

0 Kudos
Message 6 of 14
(11,801 Views)

Hi ufo,

 

"the setpoint is temperature, process value is temperature, but the output of the pid how can it be relationed to the voltage?"

The output of the PID can be seen as unitless value. You just convert it to your needed output value. To do so you have two options:

- set the PID parameters so it will scale the output to the needed range

- use "unitless" PID values to get an unitless output from SimplePID and scale that value to your needed range

 

For understanding PID it may help to read the manual of any industrial ready-to-use PID temperature controller. Wikipedia might be a good source of information too...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 14
(11,798 Views)

I think I did it but i can't understand another thing:

voltage didn't read the voltage.. the output value fo the pid is added to the current voltage so i can module the difference between the desired temperature and the measured temperature.

Voltage is read in another VI (simpler, just to control if every instrument is working) but when I insert the pid, voltage isn't read anymore.

Do i have to insert a sequence? Don't know what to do 😞 Smiley Frustrated

0 Kudos
Message 8 of 14
(11,786 Views)

Hi ufo,

 

did you ever think about the DATAFLOW? It's the basic principle of LabVIEW...

 

You created a loop that seems to run the PID vi ("seems" as I miss a lot of subVIs). This loop will stop on error or user input. After that loop has run you call a second loop with your voltage measurement. There's a data dependency! THINK DATAFLOW!

 

You would have seen this be some elementary debugging. Did you even try this?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 14
(11,775 Views)

While I was waiting you answer I already solved the problem.

Really thank you 🙂

0 Kudos
Message 10 of 14
(11,771 Views)