Error -354705 When Trying to Connect to the Vision Builder AI Engine in LabVIEW

Updated May 30, 2024

Reported In

Software

  • Vision Builder for Automated Inspection
  • LabVIEW

Operating System

  • Windows

Issue Details

I am trying to call an inspection developed in Vision Builder for Automated Inspection (VBAI) directly from my LabVIEW VI using the VBAI LabVIEW Interface API. Even though my inspection works correctly when being executed directly in VBAI, I get error -354705 in LabVIEW when trying to establish a connection with the local VBAI Engine, specifically, after attempting to run the VBAI Interface - Open Connection VI. 

Error -354705 occurred at VBAI Interface - Open Connection.vi

Possible reason(s):

Failed to connect to the Vision Builder AI engine. Another session may already be connected.


 
The error is shown in the following dialog box:
 
Error -354705

Solution

This issue may occur if there are any security policies configured within the network the computer is connected to that can block the HTTP messages being transmitted from the PC to the local VBAI Engine or if the VBAI API Interface.ini is corrupted. To identify what is causing the issue and solve it, please review the steps listed below:


Online PC

To validate if the issue is related to your network, disconnect your PC from the internet and try to run your VI again. If the execution is completed successfully, configure your network following the guidelines listed in Configuring Software and Hardware Firewalls to Support NI Products. Double-check that TCP ports 80 and 3580 are not being blocked by a firewall or third-party software. If you need further assistance or do not have enough rights to make any modifications to the system, ask your IT Team for support.  
 

Offline PC

If error -354705 appears while the computer is offline, that could mean that the VBAI API Interface.ini is corrupted. To solve the issue, try the steps below:
  1. Navigate to C:\Program Files (x86)\National Instruments\Vision Builder AI 20XX or C:\Program Files\National Instruments\Vision Builder AI 20XX, depending on whether you are using the 32-bit or the 64-bit version of VBAI.
  2. Identify the VBAI API Interface.ini file as shown in the image below.
INI file
 
  1. Delete it and re-run your VI to regenerate the INI file. Verify if the issue is solved.
  2. If the issue is not solved after executing steps 1 to 3, open the VBAI API Interface.ini file and verify if the allowmultipleinstances=True flag is there. If it is not there, add it manually to the INI file, as shown in the image below, save the file, and try to run your VI.
Allow Multiple Instances Flag