NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Call DLL created by Labview in TestStand

Hi,

 

I want to call a DLL created by Labview 7.1 in Teststand3.1.

 

And DLL will have a Sequence Context as an input parameters and two output parameters(Report, ErrorCluster)

 

How can I call this dll in teststand. I always fail to pass the Sequence Contest to dll.

 

BTW, is it possible to use CVI adapter to call dlls created by Labview. It seems CVI adapters can recogonize the parameters directly?

Can I using *TestData and *TestError directly using CVI adapter?

0 Kudos
Message 1 of 5
(4,320 Views)

I have not had a problem with the Sequence Context, at least not in LabVIEW 8.5.

 

I mapped the SequenceContext as follows in the Define VI Prototype window.

 

Name:           SequenceContext

Param Type:  Input

VI Input:        Sequence Context

Pass by:       IDispatch Pointer

 

I would not use the Error Out cluster as a DLL output as these do not map correctly in TestStand, in fact all are not automatically recognized  by TestStand.

 

To call it from TestStand use the 'C/C++ DLL ' step type. and set the Value Expression to ThisContext.

 

Thanks,

 

PH

0 Kudos
Message 2 of 5
(4,297 Views)

Hi,

I have also tried it. And seems that there is no problem to pass the sequence context to DLL from Teststand. However, the Error cluster will never be recognized by Teststand.

 

And I also followed the instruction from NI's website(Created customer container type in TS, let it pass to C/C++DLL...), but it still fails.

 

Are there some other methods which can be used to pass the error cluster in Labview when complied to DLLs?

 

 

0 Kudos
Message 3 of 5
(4,281 Views)

I've just written to the TestStand error container (Result.Error.Code, etc.) in the VI instead of passing it as a parameter.

0 Kudos
Message 4 of 5
(4,275 Views)

Hi,

 

I do it as follows, and it works great.

 

21732i95D7502B3A902E0A

0 Kudos
Message 5 of 5
(4,174 Views)