LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

display message once inside loop

Hi,

 

I'm trying to display 2 messages to the user indicating 2 distinct conditions in my program. However, since the entire program runs in a single while loop, the messages appear over and over again. If I take the message boxes out of the loop, they both appear after one of the conditions is met. I would like each message to appear once when their corresponding condition is met, have the user click OK, then have the message disappear and have the program continue running.

Any ideas on how to do this?

 

Thanks,

Daryn

0 Kudos
Message 1 of 6
(4,128 Views)

Put it in a case structure wired to the iteration terminal. Make the empty case the default and the other case (the one with the dialog!) "0", for example.

0 Kudos
Message 2 of 6
(4,122 Views)

Hi Daryn,

 

You could use a separate loop driven with a queue:

 

dialog loop.png

 

Example attached in LV2010.

 

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
Message 3 of 6
(4,107 Views)

Is it necessary for the user to do something or are these simply status updates. If you do not need the user to respond you may consider updating the status in some other way than to use dialog boxes. Over use of them can be quite frustrating for the user, especially if they simply are updating some status.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 6
(4,094 Views)

Ok I got it to work....thanks everyone!

0 Kudos
Message 5 of 6
(4,048 Views)

Whose advice did you use?

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 6 of 6
(4,044 Views)