Discussion:
Can I launch a vi when TS launches
(too old to reply)
TobyD
2008-08-15 19:10:13 UTC
Permalink
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! Message Edited by TobyD on 08-15-2008 11:48 AM
TobyD
2008-08-15 19:40:27 UTC
Permalink
OK, It looks like I can use FrontEndCallbacks.seq to make this happen. Is that the best/only way? Is there anything I need to watch for when editing this file?
~jiggawax~
2008-08-15 20:10:10 UTC
Permalink
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.   
Loading...