Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

The best way to read variable in VBAI ?

Hello,

I'm using a testStand Sequence which call VBAI files. I used the tutorial 'Running a vision builder AI Inspection from TestStand' and it work fine.

 

What I want to do now is to pass parameters from TestStand to VBAI. For exemple, I have a global variable in TestStand which should tell to the VBAI file if VBAI must save the image to the Hard drive or not. I have another global variable in TestStand which give the path of the file and I want to pass this information to VBAI. What is the best way to do that ? I use TestStand 3.5, LabWindows/CVI 8.1 and not Labview

 

Regards

Laurent

0 Kudos
Message 1 of 8
(5,172 Views)

Hi and thanks to post on NI forum,

 

I suggest you to see this link: http://zone.ni.com/devzone/cda/tut/p/id/4007

 

Regards,

Message Edité par ajangot le 01-22-2009 09:19 AM
0 Kudos
Message 2 of 8
(5,154 Views)

That's the link to the tutorial I spoke in my first mail. I read it but I've not seen any answer to my problem.

 

Laurent

0 Kudos
Message 3 of 8
(5,150 Views)

Hi,

 

At the end of this tutorial, you have activex method. You can open an activex control to control your VBAI so you will be able to send and receive and send variable.

 

Regards

0 Kudos
Message 4 of 8
(5,134 Views)

Sorry, but I'm not very comfortable with ActiveX. Don't you have an example which could help me to understand how I can do what I want ?

 

Should I use a step in TestStand with the Adapter ActiveX/COM ? If yes, what is the good automation server ?

In my VBAI file, I intend to create a variable with the 'Set variable' step. I want that that variable take a value given by TestStand. Any hints?

 

Laurent

0 Kudos
Message 5 of 8
(5,129 Views)
Laurent, Have you found an answer to your problem? I am looking to do something very similar, except instead of using TestStand, I am trying to use LabView to pass along variables to VBAI. In fact, I am trying specifically to pass along the image path or even the image itself from LV into VBAI. I have not found an answer, yet. VBAI has many activeX controls--which are not very difficult to use in the LV setting--there are some good examples out there. However, I cannot find any examples that pass info INTO VBAI using ActiveX, especially none that passes a FileName and can have VBAI access it to choose what image to inspect. I'm just curious to know if you have found answers to your questions, since they are similar to mine. Thanks. -Chris W
Chris Walker
Certified Labview Developer
0 Kudos
Message 6 of 8
(4,872 Views)

Sorry, I didn't find any answer which could help you. In fact, I did what I want in a dll written in LabWindows/CVI

 

Laurent

0 Kudos
Message 7 of 8
(4,859 Views)

I did figure out a way to pass images to VBAI. Basically, I use a "temp" folder in VBAI Simulate Acquisition and then in LV I move an image there from a user-defined source directory and then move the image back out of that directory.

Chris Walker
Certified Labview Developer
0 Kudos
Message 8 of 8
(4,852 Views)