annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

Displaying a Message without pausing the program

Résolu !
Accéder à la 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 Compliments
Message 1 sur 9
5 564 Visites
Solution
Accepté par 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 Compliments
Message 2 sur 9
5 560 Visites

Hi GerdW,

 

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

0 Compliments
Message 3 sur 9
5 554 Visites

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 Compliments
Message 4 sur 9
5 543 Visites

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

 

My apologies I'm new to LabVIEW

0 Compliments
Message 5 sur 9
5 537 Visites

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 Compliments
Message 6 sur 9
5 531 Visites
Solution
Accepté par 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 sur 9
5 515 Visites

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 sur 9
5 465 Visites

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

0 Compliments
Message 9 sur 9
4 764 Visites