LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to show a warning message.

In building a case structure, I want to show a warning message like 'Invalid Type', etc. at a certain case. That is, if a certain case is chosen, I want to show a warning message on the front panel only when the case is triggered. How can I do that ?
0 Kudos
Message 1 of 3
(3,636 Views)
You can use the One Button Dialog function or write to a string indicator. If you use the dialog function, make sure that the illegal case condition gets cleared otherwise the dialog window will just keep popping up.
0 Kudos
Message 2 of 3
(3,636 Views)
One classic way could be to create a string indicator with the correct message and make it visible or hide it with a property node.

An alternative way is to create on the front panel a string indicator taken from the Classic Controls palette: every part of this type of indicators can be painted in transparent, that way making it completely invisible to the user.
In your program simply wire the correct message to the indicator to show instructions or warnings and so on. or wire an empty string to hide it.
An extension to this method is to use a Text Ring with an empty case and several messages added after it: wiring the correct numeric value to the indicator will show the correct message to the user.

If you need to add some colour information to the messa
ge (for example paint the background of the message in red if an error or in yellow if a warning) choose a Flat Square Button from the Classic Controls >> Boolean palette, make the boolean text visible, put it in False state, paint it in transparent and make text an empty string, then change to True state, write the desired text and paint it with the desired colour. With this method, wiring a True to the indicator will show the message (very impressive due to the background colour), while writing a False will hide it completely.

Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 3 of 3
(3,636 Views)