Showing results for 
Search instead for 
Did you mean: 

How to prompt message, then make it disappear when conditon is met

LabView noob here.


I am looking to prompt a message to a user when a sensor is unplugged, then have the message go away when the user plugs the sensor back in.


Right now, I am using a sub-vi to display the message, but cannot make the message disappear when the sensor is present (end the sub-vi and continue on in the main vi).  Any help is appreciated.


Thanks in advance.




0 Kudos
Message 1 of 4

You could use a combination of property nodes and a case structure. This example might give you some ideas.

0 Kudos
Message 2 of 4

Because of dataflow, you need the popup to be in a parallel loop to the one that is checking the sensor. This way it allows for your main loop to continue iterating and checking for a reconnect. Are you using LabVIEW 2012? If so, a call to the "start asynchronous call" node is probably the easiest way. Create a queue to use send this loop a message when a reconnect happens. When it gets that message, the subVI will close its front panel. I will try to draw up a quick example.

0 Kudos
Message 3 of 4

Here's an example. Hopefully you have LV 2012. This launches your popup in parallel. However, it would need to be a "modal" dialog in your applicaiton. For this example, I couldn't do that or else you wouldn't be able to click the button to simulate a reconnect of the hardware. If you don't have 2012, there are other ways to dynamically launch VIs that can be shown to you. Or, you could always just have a static parallel loop on your block diagram that only shows the subVIs front panel when commanded to do so via a queue message, notifier, etc. Bottom line, there is more way to skin a cat, but every way involves the popup being launched in parallel.


Does this make sense? Hopefully seeing this example helps clarify.


False case just enqueues a "true" boolean. Also, you will get a bug if you don't reset the "dis/reconnect" simulate button back to false before running. See if you can figure out why this bug happens ;). Good beginner debugging practice.


0 Kudos
Message 4 of 4