Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

NationalInstruments.Vision.Common 64-bit compatible

Solved!
Go to solution

I am currently developing a 32-bit application using the Vision Acquisition Software libraries (March 2010 release).

I am having an issue getting my application to run on XP 64 bit and I seem to be hung up on NationalInstruments.Vision.Common.dll, Version 9.0.20.45000. Looking into the GAC I see that is was targeted to an x86 machine rather than Any CPU and hence is not MSIL code. The other NI assemblies I reference are MSIL.

I am not trying to get 64 bit functionality, I just have a very powerful test machine that happens to run a 64 bit OS

 

I am just wondering if there is a version of this assembly out there that I would be able to use to get this application to run on my 64 bit machine. Also, I am aware that NI plans to have all these assemblies 64 bit compatible at some point.

 

 

Thank you for any help.

 

 -Tom

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

Is the question confusing?

 

Basically what I am trying to figure out is if there is a new version of NationalInstruments.Vision.Common.dl. The version I have is 9.0.35.45000

 

Thank you,

 

-Tom

 

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

Hello Tom,

 

March 2010 is the newest release of Vision Acquisition. This particular version of VAS does support Windows 7 64bit, but it will run within the 32-bit emulation layer, Windows on Windows (WOW64)

Andy Chang
National Instruments
0 Kudos
Message 3 of 7
(5,728 Views)
Solution
Accepted by topic author Tom.Net

Hi Tom,

 

What you are seeing is correct. The current Vision .NET assemblies are compiled as 32-bit-only because the underlying support has not been implemented/tested yet. The other assemblies are compiled as MSIL because their underlying support is available within a 64-bit process. Currently NI Vision is only supported in a 64-bit process under LabVIEW, not C or .NET.

 

Now, what you are seeing is a very common problem. By default, .NET applications (the EXE itself) will run in whatever bitness of the host OS, regardless of if their dependencies can all be loaded in that bitness. This presents a problem because newer versions of Visual Studio will compile your app as MSIL ('Any CPU') by default, so it will run on any bitness. This presents a problem if any dependencies (such as Vision) are 32-bit only.

 

Fortunately, there are several ways to fix this. You could of course change the target platform of your EXE to be x86 instead of the default MSIL. However, if you either don't want to recompile your app or want it to continue being compiled as MSIL, you can also follow instructions here: http://blogs.intesoft.net/post/2007/12/Running-NET-Apps-in-32-bit-mode-on-64-bit-Windows.aspx to change the target in the EXE's header to be marked as 32-bit. This will guarantee a certain bitness regardless of the host OS.

 

Eric 

Message 4 of 7
(5,725 Views)

Andy C. wrote:

Hello Tom,

 

March 2010 is the newest release of Vision Acquisition. This particular version of VAS does support Windows 7 64bit, but it will run within the 32-bit emulation layer, Windows on Windows (WOW64)


 
This is a bit misleading...
All drivers within Vision Acquisition (with the exception of Legacy IMAQ 1394) will run on a 64-bit OS. They have 64-bit kernel drivers that run natively.
Individual processes on a 64-bit Windows OS can run as 32-bit or 64-bit. The IMAQ and IMAQdx drivers both have full support for running in a 64-bit LabVIEW process. The same is true with Vision Development Module. IMAQ I/O (used for reconfigurable I/O on the CVS and some 1394 interface cards) does not currently have 64-bit application support, so you would need to run from a 32-bit process.
For other programming environments (C, .NET), 64-bit support is currently more limited. The IMAQ driver has a 64-bit C API. Vision is not currently available in 64-bit within C or .NET.  Because IMAQ and IMAQdx rely on Vision within their .NET interfaces, they do not have 64-bit support in .NET yet either.
Hope this clarifies things for others coming across this thread...
Eric 

 

Message 5 of 7
(5,720 Views)

@BlueCheese

The link you sent me directing me to set the 32BIT flag via CorFlags.exe worked great. I am now able to run my application on a 64 bit machine (albiet not to 64 bit potential).

 

"Vision is not currently available in 64-bit within C or .NET.  Because IMAQ and IMAQdx rely on Vision within their .NET interfaces, they do not have 64-bit support in .NET yet either." - Great point and that is exactly the answer I was looking for. I will have to wait until full 64-bit support is available.

 

When the Vision.Common.dll is  updated for 64 bit and released, will this be packaged in the new VAS?

 

Thank you,

 

-Tom

0 Kudos
Message 6 of 7
(5,717 Views)

Hi Tom,

 

Yes, when updates are made to the Vision assemblies to make them 64-bit compatible they will be compiled as MSIL and installed the way they currently are.

 

Also note that running a 32-bit app on a 64-bit OS still gives you a lot of benefit because your process has access to 4GB of virtual memory space rather than 2GB. This makes a huge difference because that 32-bit space tends to get very fragmented.

 

Eric 

Message 7 of 7
(5,715 Views)