Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Running Imaq hardware example

Hi,

I am having trouble running C:\Program Files\National Instruments\Vision\Examples\MSVB.NET\1. Getting Started\Hardware.sln. It compiles and runs okay, but when click on "Start Synchronous Acquisition" or "Start Asynchronus Acquisition" bottons, the following error message appears:
---------
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
Additional information: Starting IMAQ operation
Function-specific; see function description.
---------

The program stops at CWIMAQ1.Start().

Ni-IMAQ driver is 3.1.0
IMAQ Vision is 7.1 (NI License Manager shows Vision Assistant and Vision are both Activated)



Also, all VB programs written for IMAQ Vision 6.0 do not work after replacing "AxCWIMAQControlsLib" with "NationalInstruments.CWIMAQControls" and recompiled. They, too, also stop at CWIMAQ1.Start() with similar error msg.

Please help, thank you.
0 Kudos
Message 1 of 2
(3,104 Views)

Hi Kale,

Thanks for using our Discussion Forums. Its always good to see these interesting questions. I am confident that we can resolve this issue.

I believe that error means that the argument datatypes are incorrect on the method you are invoking. This type mismatch error could be from any number of things, but because an older version of the IMAQ driver was at one point installed, I am guessing that the example programs you have use an older data type that used to represent images in an older version of IMAQ. We commonly see this problem in Labview, and have become fairly good at diagnosing it. Seeing the problem within .NET is interesting, and should we find that this is the case, I will be sure to document the problem using our KnowledgeBase articles.

In order to resolve the problem, I would start by uninstalling both Vision and the IMAQ drivers. Additionally, it would be good at this point to check and ensure that there are no other versions of these two softwares lingering on your computer. After we have done this, I would install your IMAQ driver, preferably the latest version (3.1.1) if possible. 

After installing the driver, reinstall your most recent version of Vision, and ensure that you include support for your programming language. You can do this by selecting a custom installation and browsing within the "features to install" to ensure that the item is checked. After installing Vision, check again to see if you can open the example programs.

I should mention that even if this fix works for your examples, it will not allow the older VIs to be run. In order to do this, the various data types would need to be changed by hand to mirror the new datatypes found in the newer examples.

Let me know how it goes!

Robert

0 Kudos
Message 2 of 2
(3,080 Views)