LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Exporting enumeration types to use in TestStand

Under TestStand 2.0 I am calling functions in a DLL created with LabWindows/CVI 6.0 through the DLL flexible prototype adapter.
In the CVI code a defined enumeration types that I would like to export to TestStand so that I can use these enumeration types to pass parameters from TestStand to my DLL.
How can this be done?
0 Kudos
Message 1 of 3
(3,294 Views)
Thom,

You need to make a type library for your dll in order to export the enumerated types. The TestStand User Manual states this as:

Enumeration Parameters
When you select a numeric parameter that accepts an enumerated type from a DLL that has a type library, the Value Expression control becomes a combo box from which you can select elements of the enumeration. You also can enter an enumeration symbol or its responding numeric value directly into the Value Expression control or the Function Call control."
TestStand User Manual March 2001 p. 13-9

There is a Knowledge Base (KB 2NHB2JEV: How to Create a DLL with an Embedded Type Library in LabWindows/CVI so that TestStand c...) that describes how to create a dll in LabWindows/CVI with an embedded Type Library. There are some links within the Knowledge Base that should give you sources for more information.

Hope that helps!

Shannon Rariden
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,294 Views)
Thanks Shannon!
With that I figured out how it works:
First, of course you need to create a function panel for each exported function. If you want to use arguments of an enumeration type, you need to define that type in a header file (.h file)! This is important. It does not work if the typedef is in a .c file!
Then you need to define that same data type in the function panel editor (Options >> Data Types ...), i.e. give it the same name as in the .h file.
As a result the enumeration type description will be put to the type library resource of the DLL.
0 Kudos
Message 3 of 3
(3,294 Views)