08-03-2015 01:23 PM
I'm currently building a control. I have a condition for three booleans to become true to enter a case structure as true. One of the conditions is a temporary increase in temperature. I want to stay in the case structure after the temperature becomes false but both of the other booleans stay true. Is there a way to do this or should I be using some other technique?
Thanks,
Colt
08-03-2015 01:28 PM
Attach your code so we can match up your description with something we can look at so we can understand.
You say "enter and exit" a case structure, but the concept of staying within implies that you have some sort of loop. How you have the loop vs. the case structure set up matters a lot.
You should investigate "state machine" by searching the forums.
08-03-2015 01:28 PM
Do you currently have a State Machine set up? If so, you just need to check two of your booleans to say if you should remain in that state.
08-03-2015 05:10 PM - edited 08-03-2015 05:11 PM
I think this guy is running into the same misconception I and many of my classmates ran into about LabVIEW back in the day. When your code enters the True Case, it will complete the True Case and immediately exit the True Case to complete whatever other tasks that may be outside of the Case Structure (assuming it didn't already do them). Then, the while loop (you must have a while loop) will move on to the next iteration, meaning it will do it all over again.
Now, if you know already know and understand how code works in general (about iterations) then do forgive me. I've edited a lot of student code and have seen this very mistake. A misunderstanding of the fact that code reiterates and will do it all over again if not told to do something else. Typically the mistake is made with Event Structures. I know it doesn't make much sense to not understand that...but trust me, it makes sense to those who don't understand. ha