LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Producer/consumer

I have a functional test.vi and in that vi is a do/while loop and inside that loop is a Statemachine.  One of the statemachine test is to close a relay which turns on a motor that runs until contacts on the uut are closed.  This satisfys a condition (loops until it is)  and the statemachine goes onto the next state.  The condition to satisfy is in a dowhile loop.  While the motor is turning and the condition is being checked ( for about 10sec) the screen is just a stagnent picture of something I put up.  I would like to build my own busy indicator ( which I've already done) and display it while the motor is turning AND the condition to move to the next state HASN'T been met yet.  Is the best way to do this w a consumer/producer ( which I'm unfamilar w but looks "easy") or should I use a local variable to pass the "TRUE" value out to the looping busy incdicator vi that is alos running while my condition is being checked?

Thanks..

0 Kudos
Message 1 of 2
(2,318 Views)

First, About the cursor, Use Set Busy.vi and Unset Busy.vi off the palattes (Programming>>Dialog and User Interface)  no need to "Roll your own" and your user's expect that the UI will be unresponsive while the Cursor looks like a spinning wheel.  Don't go and confuse the poor users by giving them a new type of cursor they don't recognize!

 

Now lets talk about state design:  Start with a trip to Grandma's (Yes that's a link- go read the thread, you have a similar issue)  After you digest that we should discuss what happens when the UUT is "Bad" and the contacts on the UUT remain open regardless op motor operation.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 2
(2,313 Views)