LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to load a warning message in the sub_VI in a true 'case' statement.

I wrote a sub virtual instrument (sub_VI) containg a case structure in which a warning message is supposed to be shown only when a case is true, and this works fine by itself alone. However, when I put this sub_VI in the main VI program, the warning message doesn't come up even when the case under sub_VI is true. Is there any way to show this warning message even with the sub_VI under the main VI ?
0 Kudos
Message 1 of 3
(2,955 Views)
Your Warning Msg Subvi should be inside the True condition of a Case on your Main vi, not your subvi. Then, on your main.vi, when that condition is true, it will run any function inside the Case, such as your subvi. Just make sure the subvi execution property is set to 'Run when Open'.
Good luck with it,
Doug
Message 2 of 3
(2,955 Views)
By default, sub VI's do not open their front panel when run. If you are putting your warning message on the front panel, then the message will appear when the VI is run on its own (as the main VI) but not when it is run as a sub VI.

If you use one of the dialog functions such as the "One Button Dialog" fromt the "Time and Dialog" menu, then the message will appear even if used in a sub VI.

The other option is to right click on your sub VI and set it's properties to open when run and close again afterwards.

Rob
0 Kudos
Message 3 of 3
(2,955 Views)