08-05-2007 09:02 AM
08-06-2007 01:57 AM
Hi,
Why are you calling this via a VI, why dont you call it direct from TestStand?
Regards
Ray Farmer
08-06-2007 03:02 AM
Hi,
According to our facility's policy, test sequence should contain only homogeneous steps. Each sequence step is a LabView module call.
Some common functionality provided by means of additional API, which is available from LabView modules. This API is in form of "C" dll.
Thanks, Misha.
08-06-2007 05:35 AM
Hi,
That seems to be very restrictive and limits the flexibility of TestStand.
I'm not sure you can convert the Reference passed from TestStand to your LabVIEW VI into a IDispatch type to pass to your dll function call.
Regards
Ray Farmer
08-06-2007 06:48 AM
Actually, if I use (IDispatch**) parameter type in "Call Library Function Node", and change function prototype to:
"void __declspec(dllexport) __stdcall TheFunction(struct IDispatch ** seqContextDisp);", it works, but makes impossible to call "TheFunction(&ThisContext)" directly from TestStand. In this case TS reporting the following error:
"Could not accept the parameters passed in. Only values of type 'Object Reference' may be passed 'By Reference' for this parameter.
Error in parameter 1, 'seqContextDisp'.".
What should be TheFunction() signature to satisfy both: TestStand and LabView?
Thanks, Misha.
08-06-2007 09:42 AM
08-06-2007 10:23 AM
Brian!
This is exactly a point:
LabView not accepts (IDispatch*) but (IDispatch**)
and vice versa
TestStand not accepts (IDispatch**) but (IDispatch*)
Thanks, Misha.
08-07-2007 06:13 AM
Hi Misha,
I would be glad to help you with this issue. I am currently trying out several different methods of passing the Sequence Context between LabVIEW and a C DLL, and I will let you know once I have found a working method. Are you using CVI to program your DLL, or another C compiler?
Regards,
Casey Weltzin
Applications Engineer
National Instruments
08-07-2007 07:17 AM
Hi,
I am using:
Microsoft Visual C++ 2005
Microsoft Visual C++ 6.0
CVI 8.0.1
LabView 8.2
Thanks, Misha
08-07-2007 09:01 PM
Hi Misha,
After working on this issue for many hours, I have not yet found a way to correctly pass the TestStand Sequence Context from LabVIEW to a CVI DLL. I will continue to research potential solutions to your problem, but at this point I would very strongly recommend that you simply call your CVI DLL directly from TestStand.
Being able to call code in different forms is one of the great advantages to using TestStand in the first place, so I think putting a limitation of a single adapter type on your sequence is quite restrictive. Your current question is a great example of that advantage; passing the Sequence Context from TestStand directly to a CVI DLL takes roughly 30 seconds to code and works great!
Perhaps it would help if you could explain your requirement of "homogeneous steps". What goal is this meant to accomplish? By calling a DLL through LabVIEW from TestStand, you are greatly increasing the complexity of your application without reducing the need for external libraries.
As I mentioned above, I will continue working to investigate possible solutions to this issue. Have a great day Misha!
Regards,
Casey Weltzin
Applications Engineer
National Instruments