LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling condensing temperature by controlling opening valve

Hi,

I want to control the condensing temperature by the opening of a valve as shown in the diagram below:

alhabeeb_0-1724395334361.png

The valve is burkert 3280 controlled by tension 0 to 10 (V) as shown in the table below:

 

alhabeeb_1-1724395501208.jpeg

Let say, for example, the outlet fluid temperature (T_f_out) in range of 80 to 30 (°C) when the valve is totally close to full open, respectively, and I want to set the open of the valve to have T_f_out = 40 (°C), for instance. How can I do that using PID controller or any other way in LabView? Please, if someone knows, give me the code rather than send me somewhere. 

 Thanks

 

0 Kudos
Message 1 of 22
(512 Views)

@alhabeeb wrote:

Let say, for example, the outlet fluid temperature (T_f_out) in range of 80 to 30 (°C) when the valve is totally close to full open, respectively, and I want to set the open of the valve to have T_f_out = 40 (°C), for instance. How can I do that using PID controller or any other way in LabView?


Setup a loop with these items:

  1. read the T_f_out value using your DAQ device.
  2. place a PID function with pv (T_f_out), sp, output range as [0..10], suitable PID gains and let it calculate the needed output value.
  3. use this output value to set the voltage of an AO channel.

To determine the PID gains you can do some step-response tests and apply the common rules on the step response measurements.

 


@alhabeeb wrote:

Please, if someone knows, give me the code rather than send me somewhere.


All you provide is some information about that valve, all other information is simply missing.

You really should hire someone to write your code and place your request in a different forum when you aren't able/willing to create some LabVIEW code on your own…

Best regards,
GerdW


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

Hi,

 

For me, you'll need a support to allow the 0-10V to your valve such as an AO of a PLC.

You can use this kind of VI:

Ayous_0-1724399777454.png

To use it you'll need to: fix the setpoint (40°C), fix the the process variable (the actual temperature returned by a temperature sensor), fix the output range (0-10 for exemple) and you'll need to send the output to you PLC which will change his 0-10V value to control the valve. Modify the PID gains function of the comportment.

 

Respectfully,

 

0 Kudos
Message 3 of 22
(484 Views)

Thanks for the info



Setup a loop with these items:

  1. read the T_f_out value using your DAQ device.
  2. place a PID function with pv (T_f_out), sp, output range as [0..10], suitable PID gains and let it calculate the needed output value.
  3. use this output value to set the voltage of an AO channel.

To determine the PID gains you can do some step-response tests and apply the common rules on the step response measurements.

 


I did what you said but always the voltage is 0:

alhabeeb_0-1724401633533.png

and all info about the valve is attached.

 

 

Download All
0 Kudos
Message 4 of 22
(471 Views)

@Ayous  a écrit :

Hi,

 

For me, you'll need a support to allow the 0-10V to your valve such as an AO of a PLC.

You can use this kind of VI:

Ayous_0-1724399777454.png

To use it you'll need to: fix the setpoint (40°C), fix the the process variable (the actual temperature returned by a temperature sensor), fix the output range (0-10 for exemple) and you'll need to send the output to you PLC which will change his 0-10V value to control the valve. Modify the PID gains function of the comportment.

 

Respectfully,

 


Hi,
I did that, but always the output is 0?

Thanks

 

0 Kudos
Message 5 of 22
(468 Views)

Can you show us your code ?

 

Respectfully,

0 Kudos
Message 6 of 22
(450 Views)

@alhabeeb  a écrit :

Thanks for the info



Setup a loop with these items:

  1. read the T_f_out value using your DAQ device.
  2. place a PID function with pv (T_f_out), sp, output range as [0..10], suitable PID gains and let it calculate the needed output value.
  3. use this output value to set the voltage of an AO channel.

To determine the PID gains you can do some step-response tests and apply the common rules on the step response measurements.

 


I did what you said but always the voltage is 0:

alhabeeb_0-1724401633533.png

and all info about the valve is attached.

 

 


Oops i didn't see this answer,

You need to do 1 loop and at each iteration of the loop:

- Read the temperature

- Compute the PID

- Write the output value

 

Respectfully,

0 Kudos
Message 7 of 22
(441 Views)

Hi alhabeeb,

 


@alhabeeb wrote:
I did what you said but always the voltage is 0:

alhabeeb_0-1724401633533.png


No, you did not what I wrote!

I wrote "create a loop", but I see two loops in your image!

(Did you even try to debug your VI to learn why "the voltage is always 0"?)

 

Put the 3 items from my previous message into a (aka one aka 1) loop: reading pv, calc PID, output valve value…

 

  • Why do you read a waveform from AI channel when all you need is a single scalar sample?
  • What's the point of using a Graph when you read single samples? (Wouldn't a chart make more sense?)
  • Where do you define the allowed output range of your PID?
Best regards,
GerdW


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

Thanks all. This is my current code:

alhabeeb_0-1724405787095.png

but there is something wrong with it. T_f_out is 0 and voltage increases?!

I set the gains 

alhabeeb_1-1724405882122.png

Any suggestion?

Thanks

0 Kudos
Message 9 of 22
(417 Views)

Hi alhabeeb,

 


@alhabeeb wrote:

This is my current code:

alhabeeb_0-1724405787095.png

but there is something wrong with it. T_f_out is 0 and voltage increases?!


  • Usually you use different DAQmx tasks for AI and AO channels. Any reason you want to use only one task?
  • When T_f_out stays at a constant value and your sp is different to pv then the PID will change it's output value until it reaches the output limits. Basic PID behaviour…
  • When the P gain is wrong (wrong sign) then the output value increases instead of decreasing: I guess you want to close the valve when T_out is lower than required…
  • How did you determine the PID gains?
Best regards,
GerdW


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