LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TURN ON DIGITAL OUT

Solved!
Go to solution

Just I want turn on the heater if the temperature is below 0.

 

Attached is the just part of the huge program. In this case the heater is just turn on for while and turn it off even the temperature is below 0C. How can I keep it  on, while waiting on this case for 4 hrs.

 

Without waiting period is just working fine.

 

Please let me know you gus need more info.

 

I am using labview 8.2

 

Thanks for your time

 

 

0 Kudos
Message 1 of 11
(3,047 Views)
What are you trying to do? Your VI will start, then doing nothing for 14400 seconds, and then stop. You will only ever take a single reading at the very beginning and never again. Even if you place the code in a loop, it's very bad design to have such a long wait where you cannot interrupt the program and stop it.
0 Kudos
Message 2 of 11
(3,045 Views)

I am actuating the switchs every four hrs. Temperature  Chamber is running sepeartely it temperature varies from -40C to 85 C.

The fixture is not able to run properly in cold temp without heater...

0 Kudos
Message 3 of 11
(3,037 Views)
I know this is not the best way to do it. Not able to stop four hrs and somhow read the temp and turn it on the heater if it is below zero degrees
0 Kudos
Message 4 of 11
(3,027 Views)
You could possibly use the elapsed time function or at the beginning of the loop, get the time and then inside the loop do the same and subtract the current from the start. The Get Date/Time In Seconds or Tick Count could be used. A smaller wait inside the loop would control how often you do a read of the temp.
0 Kudos
Message 5 of 11
(3,020 Views)

I shouldn't do your homework for you  but you had so many errors and bad coding that I decided you could learn from this example.

GetTemperatureTurnonHeater.png

 

Hmmm, code snipit stuck in property node for the Actual Temp local variable.  Disregard the DigNum property node and its reference.  What sets the Actual Temp?  The OR function serves no purpose.

 

Message Edited by tbob on 03-26-2010 01:19 PM
- tbob

Inventor of the WORM Global
Message 6 of 11
(2,998 Views)

Thank you very much for your help and the feed back. The Actual temp local variable and or function not useful as you mentioned.

 

I am working on your code, and found it reads the temperature at once and hold it for specifed hours(4 hours). My temperaure is variable only need to turn on when it below zero.

 

If I am wrong correct me.

 

Thanks for your time.

Jey

0 Kudos
Message 7 of 11
(2,972 Views)

The temperature should monoitored all the time..on that loop..

 

Thanks

Jey

0 Kudos
Message 8 of 11
(2,971 Views)

Attached vi is look like working, Please advise any if there are any suggestions or need some improvements.

 

Thanks for your help

0 Kudos
Message 9 of 11
(2,946 Views)
Solution
Accepted by topic author jey11

Your loop will run every 100 milliseconds.  When the elapsed time is 4 hours, the loop will stop.  But while running, the subvi to measure temperature will execute.  If the actual temperature goes below 0, the DAQ vi will run, causing your digital outputs to turn on.  Is this what you intended?  This vi will run for 4 hours then stop.  What if your temperature goes below 0 in two hours?  Do you want your vi to keep running for another 2 hours?  Please give more detail on what you want to do.  If this suits your purpose, then the vi is fine like it is.  Only one suggestion.  If the temperature reading subvi gives an error, you may want to stop your loop.  Use unbundle function to get the status from the error out.  Wire the status into another OR function and combine it with the other OR to stop the loop.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 10 of 11
(2,934 Views)