NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

I have a

problem importing DLLs into TestStand. I'm using the DLL Flexible Prototype Adapter. I can get them to work, by manually defining the (input/output) parameters for each function. Is there a way to have the parameters and prototypes automatically loaded?Step 1. I load my DLL created using LabVIEW 6.0

Problem 1: When I click on the function drop down box and select one of the function names, I get
"This function does not have parameter information in the DLL"

Problem 2: When I click on the Reload Prototype, I get
"There is not type information in the DLL"
0 Kudos
Message 1 of 2
(2,858 Views)
problem importing DLLs into TestStand. I'm using the DLL Flexible Prototype Adapter. I can get them to work, by manually defining the (input/output) parameters for each function. Is there a way to have the parameters and prototypes automatically loaded?Leo,

If your DLL does not have a type library, TestStand will report that there is no parameter information available. The developer of the DLL or the application in which the DLL was built must create the type library. For LabVIEW you do not have the option of creating the type library manually, and you must rely on LabVIEW to automatically create the type library.

As you have noted, just because a DLL does not have a type library does not mean that your cannot call one of its functions successfully. It means that you must know the prototype of the function and must enter each parameter manually when specifying the module using the DLL Flexible Prototype Adapter. If you enter the parameters correctly, then you will be able to call the function from TestStand.

Your problem may be related to one of the following limitations.

1) Note about LVDLL function parameters:
Currently LabVIEW creates a type library only if all the parameters are basic types. Basic types consist of scalars, pointers to scalars, C Strings and pointers to scalar array data.

This limitation includes Boolean parameters. For Boolean parameters you can modify your LabVIEW VI to convert the Booleans to 16-bit integers (use the LV intrinsic function, "Boolean To (0,1)"). You can then use these integers as your functions parameters (see the exercise on page 6-15 of the TestStand 2.0 Getting Started Manual). After this change, LabVIEW can create a type library. In TestStand the value of the integer will be accepted by a TestStand Boolean property.

If your function does not have a type library, then in TestStand you must enter each function parameter manually. If you enter the parameters manually, make sure that they match the function prototype that you created in LabVIEW when you built the DLL.

2) Note about LVDLL String:
LabVIEW does not correctly create the DLL type library for LabVIEW functions containing an output string parameter. Instead of declaring the parameter as a character pointer, a C string, it declares it as a pointer to a character pointer. Both TestStand and LabVIEW do not support pointers to character pointers. When you select a LabVIEW function that has an output string parameter, TestStand 1.x will report that the function contains a parameter of an unsupported data type. In TestStand 1.x the solution to this problem is to manually add the function parameters based on the correct function prototype, as was done in "LV6i DLL Accessing TestStand String.seq". TestStand 2.0 compensates for this LabVIEW error and correctly interprets the LabVIEW type library.
Message 2 of 2
(2,858 Views)