05-02-2008 01:50 PM
I have a teststand Launched activex server application written in VB.
I then launch a VI in its own sequence thread which runs forever in a VI while loop so it stays alive and never returns. This is because the vi is a monitoring for events coming from the Launched VB activex server. This VI converts the events from the VB active x server into Notifications. These notifications are then sent back the main teststand sequence whom monitors for the Notifications.
At some point I want the Teststand main sequence to shutdown the one running VI.
How can I get testand to stop and shutdown the VI from TestStand ????
I do not want an event to come from the activex server to signal the shutdown, I want it to come from the main teststand sequence. I also donot want a frontpanel of the VI to stop the VI. I do not want the user to see the VI.
05-02-2008 03:32 PM - edited 05-02-2008 03:32 PM
I'm trying to understand your application. So is the VI launched from the VB activex server? Or is it launched from TS? You could do UI messaging but that would be quite messy. The other options is to get the sequence context from TS to the VI through parameters. Then in the VI you will have access to all TS variables. Then you can have the while loop condition trigger on a certain variable.
Regards,
05-05-2008 07:07 AM
TestStand launches the VI in its own thread. TestStand also launches the VB activex server from the main thread. I think I will try your suggestion of having the while loop pole a TS variable. I do not like poling so I will also try to put a timer on the while loop. I was also thinking to add a method to the VB activex server to call an event that the VI could detect. This would put a dependency on the health of the VB Activex server which I do like doing. Thanks for your suggestion.
Best Regards,
05-05-2008 10:18 AM