cancel
Showing results for 
Search instead for 
Did you mean: 

Custom "display message" vi does not initially show text

SOLVED
Solved!

Custom "display message" vi does not initially show text

Message contains an attachment

Good morning, NI LabVIEW community.

 

I am working on a vi that displays a message to the user and then closes after five seconds. When I run the vi itself it works fine, but when it is inserted into another vi the text does not display when the vi runs for the first time. Anytime after that the text will display though.

 

I've searched for help and fiddled around with the wiring, but I'm still having this issue. Maybe it is just not possible to do. Smiley Sad

 

Any help will be appreciated!

10 REPLIES 10
apok
Active Participant
Solution

Re: Custom "display message" vi does not initially show text

Message contains an image

try making your message indicator, "visible" through property node

Hardware%20Dialog%20with%20Timeout[2]_BD.png

JÞB
Knight of NI

Re: Custom "display message" vi does not initially show text

You have a greedy loop hogging the cpu and preventing the update to the indicator!  Toss any kind of delay in the while loop.


"Should be" isn't "Is" -Jay

Re: Custom "display message" vi does not initially show text

Woohoo! That did it, apok!

Thanks for the quick response!

 

Jeff, I understand, but there is not a delay in the loop. Should I build this vi without a loop?

RavensFan
Knight of NI

Re: Custom "display message" vi does not initially show text

Your loop really isn't doing much other than providing a very fast running, CPU hogging mechanism to put a 5 second dealy between the FP Open and FP Close.

 

If replaced the while loop with a single frame sequence structure, then put a Wait (msec) function in there with the 5000 wired to it, it will effectively do the same thing without burning CPU cycles.

JÞB
Knight of NI
Solution

Re: Custom "display message" vi does not initially show text

Message contains an image

@evannfernandez wrote:

Woohoo! That did it, apok!

Thanks for the quick response!

 

Jeff, I understand, but there is not a delay in the loop. Should I build this vi without a loop?


There are tons of ways to built that vi that do not have greedy loops

To be consistant with personal design guidelines I have mentioned around here from time to time, I'd choose something very close to this:

No Button Dialog.png

 


"Should be" isn't "Is" -Jay

Re: Custom "display message" vi does not initially show text

RavensFan, thank you for the reply and clear explanation. I have implemented your suggestion.

 

It still requires a property node for the message set to "visible", but that isn't a problem.

Re: Custom "display message" vi does not initially show text

Ah, I see, Jeff. I appreciate you taking the time to post that.

I'll give it a try.

apok
Active Participant

Re: Custom "display message" vi does not initially show text


@JÞB wrote:

You have a greedy loop hogging the cpu and preventing the update to the indicator!  Toss any kind of delay in the while loop.


i didnt realize that....if you put in the "wait(ms)" in the loop, it would work!

JÞB
Knight of NI

Re: Custom "display message" vi does not initially show text


@apok wrote:

@JÞB wrote:

You have a greedy loop hogging the cpu and preventing the update to the indicator!  Toss any kind of delay in the while loop.


i didnt realize that....if you put in the "wait(ms)" in the loop, it would work!


Easy to miss and a subtle point about busted dataflow.  Or I would have left the thread in your more than capable hands.  Forcing a redraw with a property node also worked I assume but, simply masked the real problem and without datadependancy between the greedy loop and the p-node you are left at the mercy of the compiler as to when exactly that redraw is requested.  


"Should be" isn't "Is" -Jay