NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get limits.low and limits.high from TestStand as ActiveX when using VB?

The VB code I am using establishes references to the TestStand ActiveX component (TestStand 1.0.2). It successfully processes UIMessages and retrieves the results array. However, I can't figure out how to get upper and lower limit values from TestStand.

An NI article titled "Understanding and Modifying Result Collection" says that upper and lower limits are not subproperties of the Result property, and that someone might use the AddExtraResult API to specifyadditional step properties for TestStand to include in the result list.

As I mentioned, I am using VB (VB6 Enterprise).
VB's object browser, although sufficient for other DLLs and ActiveX components, doesn't seem to
be able to give me the right kind of information for making API calls to TestStand.

The means by which I am presently getting results is to use GetSequenceContext, PreviousStepIndex, and retrieve the step.name and step.results. Later I step through the results array of the ResultObject.

Can you give me an idea or suggestion for retrieving upper and lower limits by means of VB from a TestStand step?

Thanks

Griff
0 Kudos
Message 1 of 2
(3,593 Views)
Hello Griff,

There are a couple of ways of getting the high and low limits in VB. In any case, you will need to include the TestStand API as a reference to your VB project.

I guess the easy one would be passing the Step object to your VB DLL (using a parameter input type Step) and simply use Step.Limits.High and Step.Limits.Low.

Another way is to pass the Sequence Context (This Context in TestStand) and access directly each step using .Sequence.Main().Limits.High

Attached is an example of a VB DLL with both methods. Make sure you compile the DLL again in order to get it registered.

Roberto Piacentini
National Instruments
0 Kudos
Message 2 of 2
(3,593 Views)