Error -18001 or -18002: LabVIEW Error in TestStand

Updated Oct 23, 2023

Reported In

Software

  • LabVIEW
  • TestStand

Issue Details

I am getting a -18001 or -18002 error in TestStand. What can I do to resolve this?

The -18002 Run-Time error message says the following:

Run-Time Error

Details: LabVIEW: parameter <specific parameter name> not found in the VI's connector pane.

Error Code: -18002; LabVIEW reported an error. See 'LabVIEW :' message for more details of how to resolve this issue.


An example of the Run-Time error message is shown below:
 
 

Solution

There are several sources for this error code as explained below: 

Error occurred accessing LV ActiveX Automation Server

  • TestStand runs successfully once but then produces this error on the second or third run.
If you have integrated a Microsoft Access database into your programe then this error is generated due to a driver compatibility issue with the Microsoft Access Runtime Engine. In order to resolve this please change to an older version of the Microsoft Access Runtime Engine (2013 or older).
To do this please follow these steps;
  1. Go to Control Panel >> Uninstall a Program. Search for the Microsoft Access database engine.
  2. Uninstall Microsoft Access database engine 201x (english)
  3. Download Microsoft Access 2013 Runtime or older, here is the link for Microsoft Access 2013 Runtime .
  4. Restart your machine.
  • The LabVIEW process is closed after TestStand has started an execution
LabVIEW can be closed manually by the user, programmatically with the Quit LabVIEW VI, or automatically by the Operating System in the event of a LabVIEW crash. To avoid this, make sure that LabVIEW is running and not stopped in the background of your test program. If LabVIEW is crashing, try to replicate the crash outside of the TestStand environment.
  • TestStand attempts to connect to a running instance of LabVIEW launched with different user permissions
Close the existing instance of LabVIEW and allow TestStand to launch a new instance.
  • TestStand is attempting to access a version of LabVIEW that is not present on your machine
This requires Changing the Active Version in the TestStand LabVIEW Adapter , or using the LabVIEW Run-Time Engine.
  • The ActiveX Automation Server is not correctly registered
Run the TestStand Version Selector and select the make active button.
  • TestStand attempting to access a version of LabVIEW VI's:
Enable the Reserve Loaded VIs for Execution option in the LabVIEW Adapter Configuration dialog box to reserve any VIs TestStand loads for calling with the LabVIEW Adapter.
 
Use this option to avoid reloading VIs when they are used and to make references you create in a VI you call from TestStand—such as I/O, ActiveX, and synchronization references—persist across calls to other VIs. You can store these references in a TestStand property and pass them to subsequent VIs you call from TestStand.
 

Server Access Denied

  • If you also get Error: LabVIEW VI Server Access Denied when opening LabVIEW VI this problem may be due to the VIs exported by LabVIEW, to change this option:
  1. Open either a new or existing VI in LabVIEW.
  2. Select Tools >> Options from the LabVIEW menu bar. 
  3. Select VI Server: Exported VIs from the list box at the top of the dialog. This displays a list of VIs that are exported by LabVIEW.
  4. Enter a * in the exported VIs field so that you expose all VIs. Then select VI Server: Browser Access (or VI Server: User Access if using LabVIEW 8.x or later) from the list box and make sure that you have given permission to * (everyone), specific domains or IP addresses.

Unable to Launch the 'LabVIEW.Application (or other name of LabVIEW Server)' ActiveX Automation Server First Cause: 

  • TestStand is trying to access a version of LabVIEW that is not present on your machine
This requires Changing the Active Version in the TestStand LabVIEW Adapter , or using the LabVIEW Run-Time Engine. Note: The LabVIEW Run-Time Engine can be selected in the TestStand Adapter Configuration.
  • TestStand is trying to access a version of LabVIEW that is not activated
Open NI License Manager and make sure that LabVIEW and the add-ons are activated. If not, launch LabVIEW and activate it.
  • Settings are not configured to allow the server to be launched and accessed through ActiveX automation
If you have selected Other Executable in the LabVIEW Adapter Configuration, you must make sure the server is registered and your Distributed COM (DCOM) settings are configured to allow the server to be launched and accessed through ActiveX automation.
  • Try running TestStand as administrator and see if the run-time error stops. 
  • In the protocols section, enable ActiveX.
  1.  In LabVIEW select Tools» Options from the menu bar to display the Options dialog box.
  2.  Select VI Server from the Category list to display the VI Server page.
  3. Under Protocols, enable the ActiveX
 
Incorrectly Configured Instrument
  • Check that all instruments are configured correclty in NI-MAX . For example, check IVI logical names being connected to driver session connected to actuall dlls or that DAQ task aliases are correct
  • Uninstall and Reinstall TestStand IVI step types or other applicable device driver