04-30-2013 12:46 PM
I have a LabVIEW project which consists of a number of VIs and some controls. I can create an executable (.exe) and run it.
I now need to bring the executable into TestStand 4.1. Since the TestStand adapters do not include .exe, I built a dll.
I have used VI often with TestStand, but not a LabVIEW executable.
The reason for posting is because I do not see the parameters in TestStand. I will describe how I proceeded.
In LabVIEW, I created a new build specification for a shared library (dll). I placed the top level VI in the "Exported VIs". This VI has terminals in the connector pane for the parameters I want to pass to and from the sequence step.
I define the prototype by assigning a function name and tried both "standard C calling conventions" and "C Calling Conventions". I have 6 parameters, including the basic Error In & Out clusters. Each parameter are defined as Input or Output unchanged from what LabVIEW defined. The resulting Function Prototype looks like this:
void VRItoPro2(uintptr_t *ComPort, Path *XMLFileIN, TD1 *errorIn, LVBoolean *VRIProgrammingFailed, TD1 *errorOut)
The dll is successfully built. When using the "standard C calling conventions" I do see the function VRItoPro2, but I do not see any of the parameters. The only parameter is "Return Value" = void.
Using "C Calling Conventions" results in a message saying "This function either does not have parameter information in the DLL or uses types not recognized by TestStand."
Does this mean I have to add each parameter manually? If so, how are serial (VISA) parameters entered in TestStand?
04-30-2013 12:51 PM
Did you try calling the DLL with the C/C++ DLL adapter?
04-30-2013 08:53 PM
I knew I forgot to mention something.. 🙂
I was calling the dll using the C/C++ DLL adapter.
05-01-2013 08:12 AM
Is this helpful? http://digital.ni.com/public.nsf/allkb/22BF02003B4588808625717F003ECD67
I believe that for VISA you can use the LabVIEWIOControl data type. You'll probably have to copy it and make your own data type so you can turn on the C Struct passing.
It looks like the Error already has that turned on.
Hope this helps,
05-01-2013 08:02 PM
It put me on the right track. My initial problem was having a path control. Changed it to a string and it fixed the issue.
I ended up creating a workaround for the VISA Serial Port. 😉