Please follow the steps below for both LabVIEW and TestStand parts:
LabVIEW
- Create the VI you want to use as a source file for your DLL. You can refer to the link below for more details: Generate a DLL from a LabVIEW Project
- Choose String Handle Pointer in the Pass By Parameter for String In and String Out
3. Build the DLL
TestStand
1. Create a new
Sequence File2. Create a new
String as a
Custom Data Type for your
Sequence File 3. Edit the
Properties of the custom string:
- Rename the string, LV_String for example
- In the C Struct Passing tab, check the box Allow Objects of this Type to be Passed as Structs
- Choose LabVIEW String for the Type
4. Return back to the Sequence File and create two
local variables with the
LV_String type, one for the String In and the second for the String Out
5. Create an
Action Step
6. Add the DLL in the
Module, choose the
Function and choose
None for the
Code Template7. Add manually two parameters, one for the string In and the second for the String Out
8. Set the properties for both strings as below:
- Category: C Struct
- Type: the name you chose for the custom data type
- Pass: By Pointer (*)
Additional Information
In my example, I chose to work with one String as an Input and another one as an Output. But you can do the exact same operations if you have more than two strings in your DLL.