08-15-2008 01:46 PM - edited 08-15-2008 01:48 PM
I am looking for a way to launch a vi in its own thread when TestStand launches. Is there a way to do this in the process model or before any sequence files are loaded. Here's my use case...
I have a test station with removable test heads for different UUTs. Based on the test head ID I would like to only allow certain sequence files to be opened. When the operator clicks on the "load sequence file" button, a quick check to StationGobals.TestHeadID will allow me to customize the list of available sequence files. I need a daemon running in a seperate thread checking if the test head is installed and, if it is, writting the test head ID to a station global, but I would like it to start checking as soon as TestStand is launched.
I have a couple more uses for this functionality, but they are all similar. Any ideas?
EDIT: I'm running TS 4.1 and LabVIEW 8.6 --- The Bleeding Edge!
08-15-2008 02:32 PM
08-15-2008 02:41 PM
You could put the Run VI Asynchronously step in the FrontEndCallback.seq file. That gets called whenever a user logs in and out of TS. There are basically two steps in there and each has a precondition based on the parameter being passed into the LoginLogout sequence. You could do the same preconditions for your step. The actual file is located: C:\Program Files\National Instruments\TestStand 4.1\Components\NI\Callbacks\FrontEnd but I highly recommend you move it to: C:\Program Files\National Instruments\TestStand 4.1\Components\User\Callbacks\FrontEnd (difference is NI vs User) barring no changes from TS 4.0 to 4.1. TS looks in the User folder first then in the NI folder if it can't find it there.
Let me know if you have any questions.
08-18-2008 09:26 AM
Hello Toby,
I just wanted to add that the user directory has moved in TestStand 4.1. The default location for the Front End callbacks sequence is now:
C:\Documents and Settings\All Users\Documents\National Instruments\TestStand 4.1\Components\Callbacks\FrontEnd
08-18-2008 10:24 AM