LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question about case structure

Solved!
Go to solution

Dear all,

I use labview 2017 to control a heater inside vacuum chamber. The heater has to be cooled slowly and therefore if there is a building power failure and the if the heater cools too quickly that is catastrophic. Therefore, we have used a uninterrupted power supply (UPS), which lasts for an hour after the building power is out so that we have enough time to cool the heater properly. This UPS sends a signal to the labview computer whether the building power is on or off in the form of boolean signal ( building power off is false and on is true for example). I have used this boolean signal to control a case structure such that once the building power off case is triggered, labview will slowly cool the heater within an hour.

The problem I have is that i want to make sure that once the building power off case starts to run, i dont want the true case to run even if the building power is back on. To explain, say the building power goes out and the labview starts to cool the heater. After 15 minutes, say the building power comes back on, now normally the true case will execute. I want to prevent this. I want to make sure that I can physically check the heater and vacuum before running the true case. I was wondering how I can make labview to keep running in 'False' case even if the the building power is back on.

I apologize if the question is not clear. I really appreciate all your help.

Thank you.

0 Kudos
Message 1 of 5
(2,167 Views)
Solution
Accepted by topic author nk2019

Well, your question is about boolean logic, not "case structures".

 

Use a feedback node (or shift register) initialized with TRUE and AND the previous and current value to decide, then place the result back into the shift register. Add a method to reset once you want to heat again.

Message 2 of 5
(2,161 Views)
Solution
Accepted by topic author nk2019

Sounds like you need a state machine architecture.  A state machine will execute a state and then make a decision about which state to go to next.  Using this method, you can go into a shutdown mode and in this mode, no command should be issued to start the heater back up. 

I always recommend the JKI State Machine (downloaded via VIPM) but there is a much simpler example of a state machine that ships with LabVIEW. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 3 of 5
(2,156 Views)

Thank you both of you for answering the question. I think they will really help me to solve the issue. Sorry about the wrong topic.

Regards.

0 Kudos
Message 4 of 5
(2,150 Views)

Here is something I've noticed with UPS power supplies you may want to take note of.  Occasionally they'll test themselves and switch over to battery mode for a few seconds even though there is no AC power loss.  It is enough for the UPS to send an indication it went on battery.

 

If yours does the same thing, you may want to put a little more logic in there that determines if the battery mode has been turned on for a bit longer, like a few seconds or a minute.  That way any quick self-tests and blips in that signal won't trigger your code to do a full shutdown.

Message 5 of 5
(2,122 Views)