LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID does not give an output

Solved!
Go to solution

I'm trying to regulate temperature but even though the PID VI seems to receive the necessary inputs, it does not return an output.

I am very new to labview and don't know what I am doing wrong. The file is the program with the PID VI. It is a subprogram that is part of a bigger program.

0 Kudos
Message 1 of 10
(1,040 Views)

Hi User,

 


@User555 wrote:

I'm trying to regulate temperature but even though the PID VI seems to receive the necessary inputs, it does not return an output.


It would help when you could downconvert your VI for LV2019 (File->Save for previous)…

 

How do you determine the PID function does "not give an output"?

IMHO that function will ALWAYS give an output value - maybe it is a value not expected by you!?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(1,037 Views)

I'm sorry the latest version I can downconvert it to is 2012 version. 

 

But in these Pictures you can see that the current temperature is 17°C while the wanted temp is 22°C.

But the output of the PID is still 0. Do you know what could be the reason?

I am sorry i cant give you the right version I know it is hard to find the problem this way.

Download All
0 Kudos
Message 3 of 10
(1,030 Views)

Hi User,

 


@User555 wrote:

I'm sorry the latest version I can downconvert it to is 2012 version. 


I asked for LV2019…

 


@User555 wrote:

But in these Pictures you can see that the current temperature is 17°C while the wanted temp is 22°C.

But the output of the PID is still 0. Do you know what could be the reason?

I am sorry i cant give you the right version I know it is hard to find the problem this way.


The wanted temperature is "33.17", current temp is 17.83.

So there is a PID output, but it's not the expected one: how did you determine the PID gains?

How did you determine the allowed output range?

 

Why are there so many locals in the PID routine image?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 10
(1,015 Views)

The allowed output range is the input voltage to  a microwave, 10V is the max and then the microwave uses 1200 W.

The gains are the default values, I dont know how to determine them i've never done this before.

 

There are so many locals in the PID routine because some arrays are also used for different things.

0 Kudos
Message 5 of 10
(1,002 Views)

I mean the output 10V is the max voltage to a thyristor gate that puts 400V on a transfo that creates the input for the microwave.

0 Kudos
Message 6 of 10
(1,001 Views)

Happen to have some kind of manual that we can refer to? Otherwise, we're all driving blind.

0 Kudos
Message 7 of 10
(972 Views)

Hi User555,

 


@User555 wrote:

There are so many locals in the PID routine because …


your implementation is bad and does not "OBEY DATAFLOW!"…

 

You REALLY should reduce the number of locals to a bare minimum - from what I see you should not use locals at all.

You also don't need sequence frames once you "THINK DATAFLOW!"…

 


@User555 wrote:

The gains are the default values, I dont know how to determine them i've never done this before.


Then you should read a book on "basics of control loops".

You should stumble across citations of Mr. Ziegler and Mr. Nichols!

 

Before even starting with PID control loops you should understand the basic theory behind them…

 

Btw. do you really need a high-res polling wait to limit the loop rate??? A loop with lots of DAQmx read/write calls??? (A simple "wait (ms)" is good enough and you may even initialize the DAQmx tasks to implement the timing requirements…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 10
(965 Views)

Well I've looked into the Ziegler-Nichols method of calculating the PID gains, and it looks like I'll have to get another output than zero to be able to use the method. The problem is I do not understand why it does not give another output than zero, even though the temperature is much lower than the setpoint.

0 Kudos
Message 9 of 10
(926 Views)
Solution
Accepted by topic author User555

Hi User555,

 

what about measuring a step response to derive PID gains from?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 10
(904 Views)