LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

increment and decrement to reach upper and lower limit

I have to simulate a central heating system. A heater is turned on, room temp rises to 'upper limit'; heater is turned off when upper limit is reached. When heater is off, temp drops until lower limit is reached then heater is turned on again. I'm scratching my head!! have tried various case structures but cant get it to run continually. Whats the best way to do this? PS, im a noob! 🙂

0 Kudos
Message 1 of 21
(3,859 Views)

There are many ways you can control this. If you can attach the code that you have developed, we can help you sort this in the same way you are approaching with the logic.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 21
(3,851 Views)

thats my problem. I need help with the logic to approach the properly without over complicating it. Any advice?

0 Kudos
Message 3 of 21
(3,847 Views)

Let me give you a simple logic.

 

HeaterLogic.png

 

 

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 21
(3,837 Views)

I've never used the in range tool, thank you.

 

I also need help, say, input 'initial room temp' the increment or decrement to simulate the heaters being on or off. I tried a while loop with increment but it only adds 1, one time, even in a while loop. Ive connected an 'equal to' to stop but never gets that far. 😞

0 Kudos
Message 5 of 21
(3,830 Views)

Use a shift register to keep the current heater state (since you only want the state to change when you go outside of the limits).  From there, the Select function helps keep things straight.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 21
(3,819 Views)

chilemad wrote:

I also need help, say, input 'initial room temp' the increment or decrement to simulate the heaters being on or off. I tried a while loop with increment but it only adds 1, one time, even in a while loop. Ive connected an 'equal to' to stop but never gets that far. 😞


You could use another shift register that holds how much your temperature should increment.  So when the heater is ON, you set it to a positive number.  When the heater is OFF, set it to a negative number.  In a real system, the temperature is constantly changing.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 21
(3,814 Views)

i need to simulate temp rising and falling.

 

enter initial temp. if temp is below upper limit, heater comes on. when upper limit is reached, heater turns off but then I need temp to decrement until a 'lower limit' is reached. once lower limit is reached, 'heater comes on' then temp increments until it reached upper limit again.

 

my trouble started at the circuit using an initial fixed temp. my circuit incremented the initial temp, just once. I need my circuit to read the initial temp once then deal with the incremented value on the next loop. how can I get my program to read the initial temperature once?

0 Kudos
Message 8 of 21
(3,805 Views)

You should be using a shift register to hold your current temperature.  You should just initialize that shift register before the loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 21
(3,782 Views)

my mind is blown! lol so feeding the temp into the register only takes the value into account once?

0 Kudos
Message 10 of 21
(3,772 Views)