LabVIEW

cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

Can i add "Vision Builder.lvlib" to LabVIEW

Hi,

Can i add Vision Builder.lvlib to LabVIEW?

I want to create a LabVIEW vi using Vision Builder tools, if i add the "Vision Builder.lvlib" to Labview will this allow me view all the functions available in Vision Builder.

 

0 Kudos
Message 1 of 9
(4,099 Views)

Sorry but it is still not very clear how i use Vision Builder with LabVIEW!

Can i not import all the functionality from Vision Builder into the functions pallet of LabVIEW.

I have "LabVIEW 2012", and "Vision Builder AI 2011", how do i add Vision Builder functionality to LabVIEW functions pallet?Can this be done?

 

I have created a VBAI in vision builder that analyses pictures for specific objects and it works perfect. But now i want to re-create the the VBAI in a LabVIEW project and build into an executable stand alone program that can run on any machine. The reason i want to build a stand alone executable is that the user can direct the operator where the images are stored on the different machines etc etc.

0 Kudos
Message 2 of 9
(4,082 Views)

What you need to do is install the latest Vision Builder AI 2012 to work with LabVIEW 2012. Vision Builder AI 2011 will work with LV 2011 and earlier. When you're installing Vision Builder AI, there will be an option to install the API, and this will add VIs to the LabVIEW palette that will allow you to control Vision Builder AI from LabVIEW. There are examples located under the Vision Builder AI folder in API Examples folder that will illustrate how to call your Vision Builder AI inspection from LabVIEW and get the results and images from your inspection into LabVIEW.

 

Hope this helps,

Brad

0 Kudos
Message 3 of 9
(4,068 Views)

There are 2 ways of creating a LabVIEW executable that implements a VBAI inspection:

1) You can migrate the inspection to LabVIEW (Tools>>Migrate Inspection to LabVIEW). Vision Builder AI 2011 can migrate the inspection to LabVIEW 2012.

The resulting is LabVIEW code that you can build into an executable and deploy to another machine.

To generate the code, you will need Vision Development Module installed. To deploy it on other computers, you need the LabVIEW and Vision Runtime engines.

 

2) Build a LabVIEW 2012 application that instruments Vision Builder AI. To do that, as Brad mentioned, you need VBAI 2012, and install the VBAI API.

The Vision Builder AI API allows to launch the VBAI engine silently, open, run and retrieve results and images from LabVIEW.

To deploy such an application on another machine, you will need the LabVIEW runtime engine, the VBAI API interface parts, and VBAI installed on the target machine with a runtime licence.

 

Hope this helps.

 

Christophe

0 Kudos
Message 4 of 9
(4,054 Views)

I think option 1 will be my preferred, just two questions:

In my VBAI i simulate the acquisition, i point the VBAI to a folder location that contains all the images i wish to analyze.

I would like the user to input the folder path when prompted, should i do this from LabVIEW or should i do this from inside VBAI?

Should i create a "Run LabVIEW VI" step at start of VBAI to get the folder path into the Simulate acquisition? or what would be best way to do this?

0 Kudos
Message 5 of 9
(4,047 Views)

We currently don't support dynamic paths for the Simulate Acquisition step. If you know you will be generating LV code, I think the easiest option is to use the Vision Acquisition Express VI, which allows you to cycle through a user specified folder of images and you can pass a dynamic path to the Express VI. If you put this VI in the generated LV code for the VBAI inspection, and replace the Simulate Acq step in the generated code with this Express VI, (you need to install Vision Acquisition to get this express VI), this should accomplish what you want.

 

Another option, which may be easier is to declare a shared system image variable in your VBAI inspection, use a select image step instead of a Simulate Acquisition step, and then update this shared global variable from your LV app. To create a system shared variable in VBAI, go to Tools>>Variable Manager, click on System Variable tab, and add a new image variable that is published on the network. In LabVIEW create a project, right click on My Computer and select New>>Variable. For the Data Type, select Image, check the Enable Aliasing option and choose PSP URL to bind to. Click on Browse, and you should see the Vision Builder image variable under your machine name/Vision Builder. Once you select this, you can add this variable to your LV code and update it with images, and then VBAI will use this variable in the Select Image step.

 

An important downside to migrating the inspection to LV is that you have to regenerate the LV code everytime you change your VBAI inspection. The benefit of using the API (which could also use this same shared variable image option with the Select Image step), is that it can connect to multiple VBAI inspections simultaneously (locally or running on RT targets) and run inspections in parallel, you can modify your inspection in VBAI and not need to update your built app. It will require you to distribute your VBAI inspection and the VBAI Run Time, so if you don't want to do this, migrating your VBAI inspection to LV makes sense. 

 

Hope this helps,

Brad

0 Kudos
Message 6 of 9
(4,040 Views)

Unfortunately, the Simulate Acquisition step in VBAI does not allow to use previous measurement for the path. You're going to have to modify the LabVIEW code generated to prompt a dialog  to ask the user for the path.

Note that a drawback of solution 1) is that there is no "link" between the code generated and the inspection you generate it from, meaning that if you need to change the inspection, you need to regenerate the code, and you will loose any changes you made.

0 Kudos
Message 7 of 9
(4,039 Views)

Hi Brad,

Will creating a "system shared variable" do the trick for me on a folder of images or only work on one image at a time? How will i update this variable with the images i want to analyse(will i have to create the required LabVIEW code to do this)?

I gererated LV code from my VBAI, and it ran ok when i ran it, but it ran in a continuous loop constantly cycling through all the images in the folder, I would like it to run through the images once - any ideas.

 

0 Kudos
Message 8 of 9
(4,023 Views)

You will need to write the code to update this shared variable. If you have the Vision Acquisition Express VI, it will do this for you automatically. I attached what the Express VI uses in cases that's easier for you.

 

Hope that helps,

Brad

0 Kudos
Message 9 of 9
(4,018 Views)