11-01-2019 12:07 PM
I have a State Machine with a subvi in it. The code runs in the state machine then encounters the subvi. The subvi pops up a display to the user a clock and a pressure measurement. The clock counts down 2 mins while monitoring the pressure (loop). A the end of the subvi loop the final pressure value is passed back to the main vi from which the subvi was called from. This all works fine for me. If there is a catastrophic leak and the pressure drops below a large amount..say 500 psi..there is no sense in continuing w the count down. Can I use a producer/consumer routine such that if I put an abort button on the popup and the user hits it ( the producer) the subvi will end and return to the main vi?? Does this sound like its feasible and what producer/consumer is used for?? Where is Producer/Consumer in Labview 2014 ? I can't find it in the examples or on any pallets.
Thxs
Solved! Go to Solution.
11-01-2019 12:17 PM
From you description, it doesn't sound like you need a Producer/Consumer. Just put the button on the dialog window to stop the loop.
11-01-2019 12:24 PM
OK..thanks. Do you know where those are in EXAMPLES and on the pallets of LV2014?
11-01-2019 12:43 PM
I'm in 2019, but I think 2014 should have at least similar examples (it was around then that the examples got a major overhaul). But the closest example I am finding is the Queued Message Handler Fundamentals.vi.
11-02-2019 10:08 AM
I'm pretty sure that Producer/Consumer is present as a Template. Open LabVIEW, go to File, "New ..." (the dots are important!), and expand "From Template" (under "VI"). You should see a couple of Producer/Consumer Templates, which have some comments explaining the basic idea.
Bob Schor
11-04-2019 06:06 AM
thanks..