06-24-2025 03:40 PM
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:
Launch VBAI Engine
Open Connection
Open Inspection.vi
(each camera has a different .vbai
file)
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
.
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.
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.
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
.
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
Solved! Go to Solution.
06-25-2025 01:36 AM
> 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.
06-25-2025 02:00 AM
You're exactly right, the application is executing correctly. Thank you very much