NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can an VB Activex engine signal Teststand 3.5 to do something?

I want Teststand to launch and Activex engine application in VB. Then while the activeX VB engine application is running to signal Teststand to do something. The something, is to call a certain method of the VB Active X to collect an end test status.  How could this be done?  I do not want to periodically (poll) call a method of the VB. I will never know when the VB application will end and return to TestStand. I want to collect the last status right before the VB engine closes and returns to the calling TestStand sequence. Periodic polling from another Testand thread could miss the last status.
0 Kudos
Message 1 of 4
(3,332 Views)
Hi Normany,

Thanks for using National Insturments forums.

I do not think I fully understand your question so I'm going to ask some clarifications.

Your first sentence, do you want to launch the TestStand engine from VB using ActiveX?  Or do you want to launch a VB ActiveX instance in TestStand?  Both are possible, I just need to understand which it is you're attempting to do.

Your second and third sentence makes it sound as if you are running a VB Application that is using ActiveX calls to communicate into the TestStand engine, but the rest of your post would suggest you're attempting to launch VB Code using ActiveX in TestStand.

Everything I'm going to suggest here is based on your last two sentences:

Using a VB step in TestStand (either dll or ActiveX method call), you can pass your sequence context into the VB program.  Using ActiveX calls in VB you can access the TestStand engine and directly manipulate specifics about the current sequence you're running because you have the sequence context.  This manipulation includes being able to pass back into TestStand the status of the VB Application.

In the TestStand Help this is all described in:

NI TestStand API Reference Help -> TEstStand ActiveX API Overview

I hope this helps.

Justin Louie
0 Kudos
Message 2 of 4
(3,314 Views)

Justin,

Thanks for your support.

TestStand  is going to launch the VB activex engine from a TestStand sequence. I do not want the TestStand Engine complied into it the VB activex application because of the need to have the VBs independent from TestStand compiling.  Currently my TestStand code that does the launching not complied as an activex engine.

 

After the VB is launched the VB application will do a lot of testing. During this period, the testStand will be waiting in the launch sequence for the return from the TestStand launch.  While it is waiting for the return from the VB application which is doing Testing, I want TestStand to also be waiting for “signaling events” from the VB activex engine.

 

I assume I could do this from a parallel process in teststand that waits for the events from the VB active x engine. When the signal comes, I want the parallel TestStand sequence to call another method inside  the VB activex Engine to get the status. Then I want the teststand sequence calling for status to end or go to sleep.

 

I see examples of Labview VIs responding to events but do not call Teststand sequence (callback).

I saw discussions of TestStand call backs which are not called by Vis or external events from the external activex engine it is calling.

 

So, how can I have a parallel sequence wake up from an external event, do some processing, and then go to sleep or end while the other sequence which did the activex launch is still running?

 

Norman

0 Kudos
Message 3 of 4
(3,286 Views)
Hi Norman,

If I understand you correctly then what you are asking for is not possible.  In particular this sentence:

"I do not want the TestStand Engine complied into it the VB activex application because of the need to have the VBs independent from TestStand compiling."

TestStand engine needs to be running to be able to run a sequence.  The only way to truly call back and forth to asyncrhonously TestStand from a VB application is to use UI messages.  I would recommend looking into UI imessages

Justin Louie
0 Kudos
Message 4 of 4
(3,261 Views)