LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Temperature Control with Only a Heater

Solved!
Go to solution

I am a student and relatively new to LabVIEW.  I am working on a project that controls the temperature of soil in a box full of worms. My goal is to have the temperature move freely between a range of 2 numbers, Tlow and Thigh. I have a temperature sensor that reads the temperature of the soil.  When the temperature of the soil, Tsoil, is below Tlow, I have the heater turn on using a DCU. When Tsoil is above Thigh, I have the heater turn off. The hard part is dealing with what happens when Tsoil is between Tlow and Thigh.  I need to find a way to make the heater stay on up until Tsoil=Thigh and then have it turned off until Tsoil goes under Tlow again.  Basically I need to use relaxation in place of a cooling mechanism becasue I dont have one. Any help is apprecated! Thank You!  

0 Kudos
Message 1 of 6
(3,448 Views)

Hi adeperro,

 

you have two conditions:

1. Turn heater OFF when T>T_high

2. Turn heater ON when T<T_low

 

What exactly is your problem?

Best regards,
GerdW


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

Thanks for the fast response!  So with those two conditions there is no command for T_low<T<T_high. In this case the temperature of the soil will rise to T_low and then the heater will turn off. This will cause the temperature of the soil to hover around T_low and that is not want I am looking for.  I want the temperature of the soil to rise past T_low, all the way to T_high, then for the heater to turn off and not turn back on until the termperature of the soil is below T_low again. I want the temperature to fluctuate between the T_low - T_high range.  Is there any way to do this in LabVIEW?

0 Kudos
Message 3 of 6
(3,428 Views)

Hi adeperro,

 

So with those two conditions there is no command for T_low<T<T_high.

Why is there "no" command?

In case of T_low<=T<=T_high the output stays unchanged

 

All you need is a shift register - a (very) basic LabVIEW element you need to know!

 

That's an example of what I'm talking about:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 6
(3,426 Views)

Hi GerdW,

 

So I was able to follow the example you sent and apply that to my program. This is what I have. What is happening is when T<T_low the heater is ON but for T>T_low the heater is always OFF. I have never used a shift register and I am now in the process of teaching myself about. I was wondering if something stood out in this picture that looks wrong for what I want to do? 

Thanks for the help, I really appreciate it.

LabVIEW Temp Program2.PNG

0 Kudos
Message 5 of 6
(3,390 Views)
Solution
Accepted by topic author adeperro

Hi adeperro,

 

compare your CompoundArithmetic node with mine - and you will spot a (small) difference.

Small difference, big issue… 😄

 

Why don't you put this ExpressVI into the loop? Don't you want to control the heater all the time? (THINK DATAFLOW!)

Btw. cleaning up a block diagram before posting is highly appreciated!

 

I have never used a shift register and I am now in the process of teaching myself about.

Why don't you take those FREE ONLINE resources offered by NI for LabVIEW beginners?

Best regards,
GerdW


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