Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Running inspections in parallel using VBAI through ActiveX

Solved!
Go to solution

Hi

 

I'd like to incorporate VBAI inspections into our high-level LabVIEW application. However, due to performance limitations, I need to use all the 4 processor cores of the computer. I've been investigating the possibilities of running VBAI inspections through ActiveX. If I understand it correctly, at one time I can have only one connected target and the target can have only one open inspection. That means parallel inspection running is not possible. Am I right or is there any way how to reach the parallelism?

 

EDIT:

To make it clear, I'm talking about the local target (PC).

 

Vladimir

Message Edited by Vladimir Drzik on 05-20-2009 04:23 PM

View my profile on LinkedIn
0 Kudos
Message 1 of 6
(3,640 Views)

Hi Vladimir,

 

I just tried it with two inspections from LV over ActiveX and it seemed to be fine with no errors. I'm using VBAI 3.6.1.

 

 

Check out the code posted here.

Message Edited by JeffL on 05-21-2009 11:34 AM
Jeff | LabVIEW Software Engineer
0 Kudos
Message 2 of 6
(3,615 Views)

Jeff,

 

The code you are pointing at runs just one inspection at a time. No parallelism. Have you made any adjustments to the code  to run two inspections in parallel?

 

Vladimir


View my profile on LinkedIn
0 Kudos
Message 3 of 6
(3,599 Views)

Sorry, I was referring to running two instances of the same VI (renamed, I suppose) and both accessing the VBAI ActiveX server at the same time. That did not throw any errors.

 

I have not tried opening two references to the same ActiveX server within one VI, but I don't know why that shouldn't work.

Jeff | LabVIEW Software Engineer
0 Kudos
Message 4 of 6
(3,573 Views)

Jeff,

 

Sorry to reply so late...

I've tried your suggestion to open two references to the VBAI ActiveX server. I did it simply by opening both the example VIs that come with the VBAI ActiveX module. I.e., SimpleExample.vi and SimpleExampleCW.vi. Let's call them VI1 and VI2. Each of them has its own instance of NIVBAITargetControl. I ran VI1, connected to the local target and opened an inspection. After that, I ran VI2 and connected to the local target, which did not throw any error. Then I opened a different inspection. When clicking on the Inspect button, the inspection ran correctly. However, when I clicked on the Inspect button in VI1, it also ran the inspection opened in VI2. Obviously, though the two VIs had two instances of NIVBAITargetControl, they were connecting to the same target, which can have only one inspection open at a time.

 

Vladimir


View my profile on LinkedIn
0 Kudos
Message 5 of 6
(3,478 Views)
Solution
Accepted by topic author Vladimir_Drzik

Hi Vladimir,

 

It turns out that is indeed expected behavior. The only thing I can recommend is to somehow combine the inspections into one (using logic within the state machine there).

Jeff | LabVIEW Software Engineer
0 Kudos
Message 6 of 6
(3,456 Views)