LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bool controlled select state execution timing, ensuring select is executed first in state instead of other functions?

Hello!

 

I have been looking for an answer to this littler issue for a while. I am trying to make sure the boolean control of the select function happens before the rest of the code in the case is executed. Basically what I am trying to do is have a state be "Skippable" in an automated run and execute the select before the rest of the code in the each case is run. Otherwise what happens is that the case gets executed for one loop and it changes valve positions. I tried placing the boolean control outside the case to ensure its data arrives first (which is faster) and put in data stalls in the hopes that would help but it still executes to full first loop before switching to the next state.

 

I have 7 of these different states which have specific valve and flow control signals they send. The nested case is meant to only execute once in each state regardless of the number of loops (for some reason the valves partly open when receiving the same signal repeatedly) and then is reset to true so that it can execute the valve change in each state only once. I need this to work through multiple iterations because the program will run through a set of cyclic loops (dependent on a number of defined loops and a redirect to the first state).

 

Attached are two images of the situation. Any thoughts or suggestions would be greatly appreciated.

Download All
0 Kudos
Message 1 of 2
(883 Views)

You need to implement a proper state machine or Queued message handler along with an Event structure to handle UI interactions.

 

How familiar are you with the keywords I used above?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 2
(873 Views)