Reputation: 15
I'm trying to run this vi in such as when the time has been elapsed in the while-loop structure, it will pop out a 3 button dialogue box in my front panel letting me choose 3 different options which is Yes, No and Cancel. "Yes" button will proceed the elapsed time count in the while-loop, "No" button will stop the vi operation and "Cancel" button will just close the dialogue box and continue running the vi. I trying to let this dialogue box pop-out only once when the elapsed time reached 3 seconds, but somehow it constantly pop-ing out because it's been constantly meeting the condition in the while-loop. Anyone good in Labview could help me with this configuration? I'm currently using 2013 version of LABVIEW. Appreciated for any help.
Upvotes: 0
Views: 4472
Reputation: 146
Move the popup into your while loop and include a check whether it has already been displayed before.
To get the information whether it has been displayed before use a shift register:
add it by right-clicking on your loop frame
at the first loop iteration the shift register will have the value that is connected to it's left (from outside the loop). (In your case this should be a boolean constant)
at each successive loop iteration the shift register will have the value that was connected to it's right (from inside the loop) in the previous loop iteration.
Furthermore:
if you want to multiply a number by 6 there is a direct way to do it, do not add it 6 times
the sequence structure in your original VI has no effect at all
Upvotes: 0
Reputation: 1982
This code will not do what you want.
While loop have to stop before popup. But as you popup outside of your loop after popup vi will be stopped.
Insert the popup to your loop, put there case and put the popup inside the case. Connect time has elapsed Boolean to your case conditional terminal. Make sure you run the VI using arrow not continuous run option.
Upvotes: 0