LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

On/off delay

Solved!
Go to solution
I want to turn a fan on when my assembly temperature exceeds 40C and then turn the fan off when the assembly temperature drops below 35C.  If the temperature is in between 35C and 40C, the fan will either be on or off depending on whether the temperature is decreasing or increasing.  Is there an example bit of labview code that does something like this?
0 Kudos
Message 1 of 7
(3,469 Views)
If you would explain what kind of hardware you are using to measure the temperature and control the fan, you would have better luck in getting suggestions as to what examples exist. The basic logic of the program is simple so you if you are new to LabVIEW, you might want to check the tutorials.
0 Kudos
Message 2 of 7
(3,462 Views)
Solution
Accepted by topic author coyote_1

Try this.

Message Edited by Ravens Fan on 08-18-2009 04:06 PM
Message 3 of 7
(3,457 Views)

I accidently clicked solution, but it really wasn't.  What Raven's fan sent me was helpful (thank you), but the more difficult problem is how to handle the on/off scenario when the temperature is between 40 and 35.  To be more specific, if the temperature just passes below 40 but isn't to 35 quite yet, the fan should still be on.  On the flip side, if the the temp is just passing above 35 but not quite to 40, the fan should be off.  In other words, the temperature ban between 35 and 40 should be hysteresis.  I can't find any examples that do something like this.

0 Kudos
Message 4 of 7
(3,427 Views)
Isn't that just a matter of subtracting the current temp from the last temp (use a shift register)? That will tell you whether it is increasing or decreasing and it's just another condition to test for.
0 Kudos
Message 5 of 7
(3,418 Views)

Did you try what I posted?  In the range of 35 to 40, the fan is in whatever state is has been in (as stored in the shift register).  If it goes above 40, then it forces it on.  If it goes below 35, it forces it off.  The only thing that you may want to do differently is to use greater than/equal to and less than/equal to instead of just greater than and just less than.  What I posted does exactly what you describe.

Message Edited by Ravens Fan on 08-18-2009 08:14 PM
0 Kudos
Message 6 of 7
(3,413 Views)
Yeah, that piece of code worked after all.  Sorry for being such a rookie.
0 Kudos
Message 7 of 7
(3,366 Views)