LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Open Several windows ,containing messages, while the application is running at the background?

Hi,

I'm developing an HMI application with labview 7.0.
The monitored process may produce messages,warnings and alarms during continuous data aqusition. I want these messages to be shown as dialog boxes. the problem is that when a dialog box appears, the VI containing that dialog box freezes and waits for the operator's acknowledge! but I expect that VI to run aside and even open other dialog boxes for other messages. In this way, the operator can stay informed of the plant history by frequenly checking the HMI panel. Is there any way to implement such a functionality?

Any help is greatly appreciated.
Soroush.
0 Kudos
Message 1 of 7
(4,177 Views)
Unfortunately, you will not be able to perform this operation using the Dialog Vi's as these are modal and will require a user input before you can proceed (as you have found out).
A possible solution is to create your own dialog subvi and save this as a VIT (vi template). Use the invoke node to call multiple cases of this vi (use the Run VI method and set the Auto Disp to true which will close all references when you close the vi) and set your dialog messages by using the Set Control Values method.
You will probably need to play around with this to get the functionality you want.
Hope this helps.
Message 2 of 7
(4,167 Views)
Hi David,

As you said,I made a subVI to act as a message dialog box and use invoke nodes to call Run and OpenFP methods to show it to the user. it completely solves the problem if there is only one message. but if the second message comes and the first message is not acknowledged yet, there will be an error, because the message VI is already open and already running!

I saved the message VI as a VI and I'm not sure if saving it as a template would help openning independent instances of the message VI. if saving it as a template is the key, please give me more information about it. I don't understand why you suggested saving it as a template.

I also tried to make that message VI, a reentrant VI, but it didn't work too.

Actually I think the problem is changed to " how to call several instances of a VI with independent front panels", but if you have any idea of solving the main problem, it is truly welcome.

Thank You!
Soroush.
0 Kudos
Message 3 of 7
(4,163 Views)
Soroush,

On the multiple window issue...make sure the VI "Window Appearance is not set to modal" and that should allow multiple windows. As for multiple FP's...I would think if you set the VI to reentrant in the execution section it would allow you to have multiple instances of the front panel.

Have you thought about placing multiple pieces of data in the same window/graph? That way you wont have a program that creates several popups.

-Brett
0 Kudos
Message 4 of 7
(4,151 Views)
Hi soroush,
Check this link
for info on vi templates for your situation.
I have attached example to give you an idea of what im referring to.
Hope this helps.
Message 5 of 7
(4,142 Views)
Hi Everybody,

I think it is completely solved. I have uploaded my suggested code with complete documentation for anyone else who may encounter such a problem in future. See the attachment.

To David:
I have LV7.0. Therefore I couldn't check your example code, but as you mentioned, the key to the problem was using VI templates. Thank You very much for your help and attention.

Best Regards,
Soroush.
Message 6 of 7
(4,124 Views)
Soroush,

just my thoughts on that problem (as a windows user 🙂 )

In HMI the user should always be able to see and access the indicators and controls (if there are any 😉 )
If you splash your window with a unlimited number of dialog messages the operator might run into problems if he has to react ...

My suggestion (even if this treat is relatively old and you said it is solved): Feed your Messages in a named queue and run a separate process that handle ONE window (maybe not dialog, just stay on top). That gives you the opportunity to handle different priorities of the message(s) or some kind of history. If the most recent message is on top and you have to close that messagebox you might lost that information after you reached the initial problem causing message.
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 7 of 7
(4,065 Views)