LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying a Message without pausing the program

Solved!
Go to solution

Hi,

 

I'm currently trying to display a message whenever a certain parameter is reached in my code, i.e the current gets to a certain point. I tried to use "Display Message to User" but it pauses the code until I click OK. Is there any other way to go about this?

 

Thanks in advance.

0 Kudos
Message 1 of 9
(4,225 Views)
Solution
Accepted by topic author anotherabby

Hi abby,

 

use a parallel running loop to display those dialogs.

And as the simple one/two button dialogs are running in the "root" loop they tend to block other operations, so you might also create your own dialog VI to show messages to the user…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(4,221 Views)

Hi GerdW,

 

Could you please explain what you mean? I'm confused.

0 Kudos
Message 3 of 9
(4,215 Views)

Hi abby,

 

I tried to use "Display Message to User" but it pauses the code until I click OK. Is there any other way to go about this?

Because of DATAFLOW your current process/loop will stall as long as you call the Dialog to the user. When you don't want that then you need to call the dialog in a different, parallel running loop.

 

The "Display Message to User" ExpressVI is using the OneButtonDialog/TwoButtonDialog internally. Both functions will also stop certain other operations as they are bound to a "core" loop within LabVIEW. When this also annoys you then you can create your own "dialog" VI as an ordinary subVI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 9
(4,204 Views)

So I would I go about creating my own dialog VI?

 

My apologies I'm new to LabVIEW

0 Kudos
Message 5 of 9
(4,198 Views)

Hi abby,

 

So I would I go about creating my own dialog VI?

You should start with calling that Dialog function in a parallel loop.

 

I'm new to LabVIEW

There's a "Training" section in the header of the LabVIEW board - you really should take note of it…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(4,192 Views)
Solution
Accepted by topic author anotherabby

Here's a possible example...

I use the "Dialog" mode in Window Appearance to set the Dialog.vi up, and use an Event Structure to wait for the button click.

The Start Asynchronous Call node is used to run the VI without waiting for the end.


GCentral
Message 7 of 9
(4,176 Views)

Is it really required that the message pops up in a new window?  It's much simpler to put a string indicator on your front panel and write your message to it when the event occurs.  You could flash the indicator with the "Blinking" property or light up an LED indicator next to the message when you want to attract attention to it.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 8 of 9
(4,126 Views)

Thanks for the example, exactly what I was looking for.

0 Kudos
Message 9 of 9
(3,425 Views)