LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

❗ Error -354804 on Open Inspection.vi and -354706 on Run Inspection.vi with 4 cameras using LabVIEW + VBAI

Solved!
Go to solution

Hello everyone,

I'm developing a LabVIEW (2023) application to control 4 cameras, each associated with a separate VBAI inspection.
During the initialization phase (INIT), I perform the following steps for each camera:

  1. Launch VBAI Engine

  2. Open Connection

  3. Open Inspection.vi (each camera has a different .vbai file)

  4. Store the 4 sessions using Shift Registers

In the Event Structure, I have one "Inspect" button per camera.
Each event retrieves the correct session, then calls Run Inspection.vi, followed by Get Result and Get Inspection Image.


Problem:

  • During execution, Open Inspection.vi throws error -354804.

  • If I force the run, Run Inspection.vi later throws error -354706 ("inspection not open").

  • The path to the .vbai file is hardcoded (not relative), and the file does exist.

  • No Close Inspection or Close Connection is called before running.

🧪 Observed behavior:

  • On the first click on "Inspect Camera 1", everything works fine.

  • But when I click on "Inspect Camera 2" (or 3 or 4), the image does not display, and I get an error from Open Inspection.

  • Then, going back to "Inspect Camera 1" → it no longer works either.

  • However, if I only use Camera 1 without touching the other "Inspect" buttons, I can repeat the inspection many times with no problem.

This makes it look like triggering another camera's inspection breaks or corrupts the previous session.


What I've already checked:

  • All .vbai files open correctly in Vision Builder AI standalone.

  • Launch and Open Connection return no errors.

  • The sessions are stored and propagated correctly via Shift Registers (confirmed with indicators).

  • I’ve set Wait Until Done = TRUE in Run Inspection.vi.


My questions:

  • Has anyone encountered error -354804 when calling Open Inspection.vi, even with a valid path?

  • Are there any restrictions regarding file names, path length, or character encoding?

  • Could multiple parallel sessions cause conflicts if not managed or synchronized properly in a While Loop with Shift Registers?

  • Is it necessary to synchronize Run Inspection calls between cameras to avoid conflicts?

Thanks in advance for any suggestions, advice, or working code examples using multiple VBAI inspections in LabVIEW.

Best regards,
Salim

Salim28_0-1750797189008.png

Salim28_1-1750797256677.pngSalim28_2-1750797479179.pngSalim28_3-1750797542277.pngSalim28_4-1750797590273.png

 

 

0 Kudos
Message 1 of 3
(204 Views)
Solution
Accepted by topic author Salim28

> The sessions are stored and propagated correctly via Shift Registers (confirmed with indicators).

 

Not true, you have to wire the session refnums through all event cases. The original refnums are lost after Inspect 1 event executes.

 

cordm_0-1750833081461.png

 

Message 2 of 3
(151 Views)

You're exactly right, the application is executing correctly. Thank you very much

0 Kudos
Message 3 of 3
(145 Views)