LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i implement the event-dependent sequential operation of devices?

I am trying to develop a code to automate the valve operations of a gas plumbing system. for example, i would like to select "leak test" from an enumerated list and then have the system open some valves (digital output), wait for user confirmation, open more valves, activate compressor, wait for certain pressure (analog input), close certain valves, continue compressing untill certain pressure, stop compressing, wait 60 minutes while logging pressure readings. That is basically what i'm trying to implement. i am stuck on how to carry this out. i already have somewhat of a state machine built, my trouble is with the structure of how to build the sequence. I know this is probably vague, i'll answer any questions anyone has. Thank you very much.

 

Brian

0 Kudos
Message 1 of 2
(2,265 Views)
Take a look at a Queued State Machine.  Here you build a list of the order of steps to take.  It could either an array where at the end of each step, it picks off the next item on the array.  Or it could actually be a queue.   The next state to operate gets picked off the queue.  You would preload the queue with all of your desired steps.  On each iteration, it would dequeue the next state to do.  In the cases where you need to repeat a step (such as continually doing a step until a condition as been met) you would re-enqueue the same step at the front of the queue.
0 Kudos
Message 2 of 2
(2,250 Views)