LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get data from popup window

Hi,

I am trying to open a popup window (through a subVI) once the user hits a button. The window asks the user for some input (in my case a string) and to hit an OK button to close the window again. I would like to use the string for further processing.

My problem is that the string is not available outside the case structure (which checks if the button is pushed or not).
I figured that I can solve the problem by using a local variable - which might not be the best solution since local variables decrease the performance right? (I'm planning on getting more input data from the user in future) Is there a better way to do this?
Please see the attached VIs for clarification (start the 'Popup Calling VI').

Thanks
Download All
0 Kudos
Message 1 of 5
(3,002 Views)
Quick fix you can do is have the wire that goes to "outside 1" from the first case structure also go to a shift register. Then wire the left side of the shift register into that first case structure, and wire it to the output of the False case, rather than the empty string constant. This way, when the OK button is polled and returns as false, it rewrites the previous value from the popup window, rather than replacing it with an empty string.
-Cory
0 Kudos
Message 2 of 5
(2,994 Views)
See the attached mod of the calling vi.  This way is better than using a local variable, there is no chance of race conditions.


--Cory beat me to the punch


Message Edited by jmcbee on 07-24-2008 10:51 AM
0 Kudos
Message 3 of 5
(2,991 Views)
Aye, what he did 😄
-Cory
0 Kudos
Message 4 of 5
(2,988 Views)
Thank you! Works great!
0 Kudos
Message 5 of 5
(2,977 Views)