LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling Temperature

Hi,

 

I'm very new to LabView and am still experimenting but I need to figure out this problem soon. i tried so many things but there are some basics i just don't understand.

 

I want to control the temperature in a tank and I have a cold and hot water tap. I want to keep the temperature at 65C. the problem is that I don't know how to tell the program to control it for me. I use case structures to define the cases but i don't know how to tell the program to adjust when the case is false.

 

I also tried using PID (which i know is the simpler way to go) but I just couldn't find a tutorial that would really show me how to set it up step by step. It doesn't even need to be PID, PI or even P should be fine. I just don't know how to go about it.

 

Any help would really be appreciated.

Also, the cold/hot water ratio is about 0.7. At this flow rate i get the desired temperature.

 

Thanks

0 Kudos
Message 1 of 8
(4,627 Views)

Hi

Here is a tutorial for building a PID controller with labVIEW and USB.

(Unfortunaltely, i have not seen this and i dont know is it relevant to what you are asking)

 

Post back if this doesnt help
Somil Gautam
Think Weird
0 Kudos
Message 2 of 8
(4,617 Views)

Hello!

 

Typically, our customers use PID VI (installed with PID toolkit) to do closed-loop control. If you do not have PID toolkit and only need P control, you may use a constant gain to adjust to the error between your setpoint and process variable (shown below). However, using PID VI has advantages as you can set output limits to avoid actuators beng saturated and provide antiwindup capability.

Hope this helps!

 

P control Demo.PNG

 

Andy Chang
National Instruments
0 Kudos
Message 3 of 8
(4,595 Views)

A suggestion.

 

Measure the temperature.

if it is too hot...turn off the hot tap and turn on the cold tap

if it is too cold .... turn off the cold tap and turn on the hot tap.

 

Set some sort of dead zone...65+1 = upper limit, 65-1 = lower limit

 

then you can compare temperature to your upper limit and lower limit and select the case you want...(don't forget the do nothing case)

 

This is pretty much bang bang control .... do you have precise control over the hot and cold valves or just on off?

You might also consider placing a little time delay in the take temperature task so the system doesn't "hunt".

 

Good luck

 

Hummer1

0 Kudos
Message 4 of 8
(4,574 Views)

Thanks for your replies. Things are clearer now. 🙂

 

I can control the flow from the valves. and also I have to do it using control theory, so the on/off approach wont work. But its a good idea.

0 Kudos
Message 5 of 8
(4,558 Views)

Well, actualy, you could do some testing by turning on the cold (or hot) for a period of time and see how the temperature changed (a psuedo C).  You could use the on and off time of the cold and hot valves as a pulse width control for varying the amount of water at a particular temperature entering the system...but....since you have control of the valves you will want to do something optimum...

 

By the way, water must be exiting the system at some rate (perhaps variable)...so the sum of the hot and cold rates entering the system must total to the amount of water leaving the system...you probably have a level control issue to deal with as well.

 

Good luck on the controls stuff.

 

Hummer1

0 Kudos
Message 6 of 8
(4,554 Views)
yea, I have to deal with the outlet too
0 Kudos
Message 7 of 8
(4,546 Views)

I've got it going pretty well 🙂

thanks a lot!

0 Kudos
Message 8 of 8
(4,537 Views)