LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running a TestStand .seq file from LabVIEW

Okay, this _should_ be an easy one, but I've been spinning my wheels for a good bit on it.  I need a LabVIEW VI that can (1) tell TestStand to execute a .seq file (as given by a file location), (2) check to see if it's running, and (3) quit cleanly.  It's part 3 that's giving me issues.

Here's what I have: I started with the Simple OI example and stripped out all of the user interface parts that I didn't need.  It works well for points one and two -- I can load and execute a .seq file and I can call ExecutionViewManager.RunState to see if it's still going.  The issue is when I try to get rid of the open references at the end.  Half the time, LabVIEW hangs and I need to kill it in Task Manager.  The other half of the time, I get a TestStand dialog listing a lot of improperly disposed of references.

Here's the weird thing: thinking that I took too much out of the example code, I just ran it unmodified.  And I still get the same behavior in the stock code.  Just for completeness sake, here's the sample code that I started from:

C:\Users\Public\Documents\National Instruments\TestStand 4.2.1\UserInterfaces\Simple\LabVIEW\TestExec.llb\Simple OI - Top-Level VI.vi

And here's the (also example) script that I'm running:

C:\Users\Public\Documents\National Instruments\TestStand 4.2.1\Tutorial\Computer.seq

Note that yep, I'm using TestStand 4.2.1 and LabVIEW 2009.  That said, I really need the code to run in TestStand and LabVIEW 2014 as well (unmodified, if possible).  Also note, I don't care about a pretty UI, or any other functions aside from those three that are listed.  And don't ask why I'm doing it this way -- I know that this is not a standard way to approach the problem (TestStand usually calls LabVIEW, rather than vice-versa).  Oh, and one more thing: the similar example in TestStand 2014 does exactly the same thing (sometimes hangs, sometimes shows an error dialog).

Ideas appreciated.  Thanks!

0 Kudos
Message 1 of 3
(2,486 Views)

Oh, and one more bit of information: The location that LabVIEW hangs is where I try to close the reference to the TestStand Engine at the end.  Sometimes it never gets out of the Close VI.

0 Kudos
Message 2 of 3
(2,471 Views)

Okay, I may have hit upon my own solution.  The VI is enclosed.  The issue was (like with most things) me trying to make it harder than it was.  Well, that and not closing everything when done with it.  Hopefully, my fail can help others. 

0 Kudos
Message 3 of 3
(2,453 Views)