03-01-2012 09:36 AM
Hi,
I have a small question. Where can I found the dll's to run VBAI in .NET?
Thanks!
03-01-2012 10:02 AM
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
03-29-2012 11:24 AM
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)
03-29-2012 12:55 PM
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
03-30-2012 02:04 AM
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
06-19-2013 08:54 AM
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
06-19-2013 09:27 AM
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