NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView UI with event structure does not work when called from TestStand

I have a simpe Labview user interface for operators to input data (Strings).  It uses an Event Structure and functions properly when running in Labview.  When I call it from TestStand, it seems to start to respond to the first event but then appears to hang without completing the code for the event.  It will not respond to any events after this.
 
Is there a something I need to do in TestStand to make this work?  Do you have any suggestions for better methods of getting operator input into TestStand rather than a Labview user interface?
 
I have attached a version of the VI no hidden controls and without error ins and outs wired for simplicity.
 
Thanks,
Dave
0 Kudos
Message 1 of 7
(3,745 Views)
Forgot attachment.
0 Kudos
Message 2 of 7
(3,739 Views)
One of those days.  Previous attachment was wrong one.  This is it.
0 Kudos
Message 3 of 7
(3,727 Views)
I didn't seem to have any problems but I did clean up your VI befor running it. There doesn't seem to be any reason to have both a mouse down and key press events. A value change on the Booleans and the correct mechanical action seems to be enough. I wired up the error in/error out connections where you are initializing the front panel controls so that the initialization will actually happen at the beginning, I made the VI a dialog, and took out the suspend VI execution.
0 Kudos
Message 4 of 7
(3,722 Views)

Thanks Dennis.  Your version is much cleaner and is a good lesson in LabView coding.  I understand the changes except for how and why you made the VI a dialog.  How do you do this and is it not possible to run as a normal VI?

When I call it from TestStand 3.1, I have to press the 'run' and 'return to caller' buttons on the dialog for it to work.  Is there a way around this?

Thanks for taking the time to help newer developers like myself.

Dave

 

 

0 Kudos
Message 5 of 7
(3,714 Views)
I goofed. I said I had changed the VI properties from Suspend When Called but it looks like I didn't save it when I posted the VI. Just go to VI Properties>Execution and uncheck it. Then the VI will just run when called.
 
I made it a dialog from VI Properties>Window Appearance. With that, the VI will automatically show when called, close afterwards, hide the scroll bars, toolbar, and make it modal. You don't have to do this. You can check the Show VI Front Panel When Called box on the Edit LabVIEW VI call but the VI Properties>Window Appearance>Dialog gives me the settings I prefer though I usually modify them slightly to show the menu bar when I have a custom run-time menu and I usually disallow the user to close window (use the "X" button).
Message 6 of 7
(3,704 Views)
Thanks again Dennis.  Not only did you solve my specific problem, you explained things clearly and taught me some basic lessons that I will be able to apply as I continue working with Labview and TestStand.
0 Kudos
Message 7 of 7
(3,693 Views)