Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision Builder for Automated Inspection and .NET

Hi,

 

I have a small question. Where can I found the dll's to run VBAI in .NET?

 

Thanks!

0 Kudos
Message 1 of 7
(5,017 Views)

We have a MSVC 2005 and 2008 assembly for dotNET users. The example can be found in the Vision Builder AI folder\API Examples\dotNET Examples and the assemblies are in the same folder.

 

For C based examples, look under the CVI Examples folder in the API Examples directory. The dll, lib, and header can be found under National Instruments\Shared\Vision Builder AI and for CVI users the CVI project should automatically be updated to include the fp file and link to the lib located under National Instruments/Shared/CVI/bin (called VBAIInterfaceC) and the header is under the "include" folder in the CVI directory.

 

The C dll used by both the VBAIInterface.lib and assemblies is located in the windows32/system directory and is called VBAIInterfaceC.dll

 

Hope this helps,

Brad

0 Kudos
Message 2 of 7
(5,016 Views)

Hi,

I just implemented the "NationalInstruments.VBAI.2008.dll" in my VB.NET project. My vision system is managing a 5Mpixel color GigE camera and VBAI takes ca. 500msec to acquire the image and perform all controls. When I ask the image to the VBAI engine and put it into a ImageViewer control, I see the function “GetInspectionImage” taking ca. 1sec for image transferring.

How can reduce this transfer time? Is there something relating to my PC (CPU/RAM) or my OS (Windows XP)? Are there something behind this mechanism that I need to understand better?

Here below my short VB.NET source code, translate from C# NI example.

 

Thanks for your help

Simone 

 

 Public MyImage As VisionImage                             'global in my project

'***********

 Dim NewImageAvailable As Boolean

 Engine.RunInspectionOnce(-1)       

 If MyImage IsNot Nothing Then MyImage.Dispose()

 MyImage = Engine.GetInspectionImage("", 1, 1, NewImageAvailable)

 ImageViewer1.Attach(MyImage)

0 Kudos
Message 3 of 7
(4,984 Views)

Are you running locally or connected to an RT Target? I tried this out locally and with a 32MB image (7500x1500 color), it took about 320ms to call that function on my machine in LV, C, and dotNET, and about 2 ms to display it. I'm using a 64-bit OS (if you're using a 32-bit OS, it could be difficult for OS to lock that much contiguous memory) with 9GB of RAM, dual processor @ 2.67GHZ. I would suspect the memory is your bottleneck and not processor power. Make sure you have lots of RAM and your using a 64-bit OS to get the best possible perfromance.

 

Hope this helps,

Brad

0 Kudos
Message 4 of 7
(4,981 Views)

Brad,

thanks for your quick answer.

Basically I'm running locally, but unfortunately my OS is Windows XP 32-bit with 2GB of RAM.

I will test my application in 64-bit system (i.e. Windows 7) with more RAM.

 

Thanks again.

Simone 

0 Kudos
Message 5 of 7
(4,967 Views)

Hi Brad,

I'm here again... Basically I'm preparing a 64-bit system with Windows 7 x64 (4 GB of RAM) in order to perform some trials as you suggested.

I just installed VBAI 2012, but suddenly I realizedthis application is running under x32 and not x64. Do you really think that I can get more performances just changing the x64 HW and OS while the VBAI is running with 32 bits?

 

Thanks for your comment

 

Regards

 

0 Kudos
Message 6 of 7
(4,667 Views)

Well, you saw the performance I was able to get running the 32-bit VBAI app on my 64-bit machine. I think having more memory will make a big impact and hopefully you also have a faster processor. 2GB or RAM is not enough to do much...hopefully 4GB will work much better for you. I have 9GB and a dual core Xeon 2.6GHz processor.

 

Hope this helps,

Brad

0 Kudos
Message 7 of 7
(4,664 Views)