From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Loading a LabVIEW executable in Teststand

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?

0 Kudos
Message 1 of 5
(3,513 Views)

Did you try calling the DLL with the C/C++ DLL adapter?

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 5
(3,511 Views)

I knew I forgot to mention something..  🙂

 

I was calling the dll using the C/C++ DLL adapter.

0 Kudos
Message 3 of 5
(3,502 Views)

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,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 4 of 5
(3,490 Views)

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.  😉 

0 Kudos
Message 5 of 5
(3,474 Views)