Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Error on CWIMAQ.LoadInterfaceDefaults

Hi

 

I have my application running perfectly on my development PC with VB2005, Vision Developement Module 8.6.4 and IMAQ 4.2. 

 

Now I am trying to get the actually PC the will use the app running. I installed IMAQ 4.2 and Vision Run-Time 8.4.4 and all the .Net 2.0 parts. The PCI1427 and camera are working in MAX, but when I load the the app I get a fatal error (Event id 5000) on "CWIMAQ.LoadInterfaceDefaults".

 

Any ideas?

 

I have done this with VDM 8.5 using the 8.5 Run-Time and it worked first-time.

 

Thanks,

Bestbier

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

Hi Bestbier,

 

I am a little confused.  You developed your application with VDM 8.6.4 and IMAQ 4.2 and you are trying to run it on another computer with the same run-time and driver setup.  Is that correct?  The last sentance you wrote I have done this with VDM 8.5 using the 8.5 Run-Time and it worked first-time." means that you tried the same thing before in the past with the older versions and it worked correctly?

 

Is there any more information included in the error message?

 

Best Regards,

Bryan H.
0 Kudos
Message 2 of 9
(4,787 Views)

Hi Bryan

 

You are understanding me correctly. When I last did this I was using version 8.5/4.0, but had to upgrade because there was a driver bug with IMAQ 4.0 - that was a year ago, so now I am using the latest VDM, run-time and drivers.

 

As for the error, I will have the PC in my office next week and get the complete error message and post it then, all I can remember is the Windows Event Viewer showed ID 5000 and something about "mscorlib.dll" .Unfortunately I don't have a camera to test I I will give it a shot.

 

Regards,

Bestbier

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

What is the type ocamera that you are using (firewire, gigE)?

 

As a preliminary solution, try to uninstall any previous versions of NI IMAQ, then reinstall a fresh copy of it. It is a strong candidate to solve the problem.

Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
Assistant Lecturer
Mechatronics Department
Faculty of Engineering
Misr University for Science & Technology



View Waleed El-Badry's profile on LinkedIn

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

Hi

 

I am using a Cameralink camera - it does work on my developement PC which exactly the same configuration except that it has VB2005 and VDM installed.

 

I only got the PC in my office today.

 

I will try uninstalling and reinstalling and then post my findings.

 

Regards

Bestbier

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

Hi Bryan

 

I have uninstalled all NI software and reinstalled IMAQ 4.2 and Runtime 8.6.4. - Still the same error.

 

I then installed VDM 8.6.4 in evaluation mode. - Still the same error.

 

Here is the info from the windows event viewer.

 

Event Type:    Error
Event Source:    .NET Runtime 2.0 Error Reporting
Event Category:    None
Event ID:    5000
Date:        2009/05/28
Time:        04:32:10 PM
User:        N/A
Computer:    19WSXRAY5
Description:
EventType clr20r3, P1 advanced x-ray control.exe, P2 1.0.0.0, P3 4a081a56, P4 mscorlib, P5 2.0.0.0, P6 4333ab80, P7 de4, P8 c3, P9 pszqoadhx1u5zahbhohghldgiy4qixhx, P10 NIL.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 63 00 6c 00 72 00 32 00   c.l.r.2.
0008: 30 00 72 00 33 00 2c 00   0.r.3.,.
0010: 20 00 61 00 64 00 76 00    .a.d.v.
0018: 61 00 6e 00 63 00 65 00   a.n.c.e.
0020: 64 00 20 00 78 00 2d 00   d. .x.-.
0028: 72 00 61 00 79 00 20 00   r.a.y. .
0030: 63 00 6f 00 6e 00 74 00   c.o.n.t.
0038: 72 00 6f 00 6c 00 2e 00   r.o.l...
0040: 65 00 78 00 65 00 2c 00   e.x.e.,.
0048: 20 00 31 00 2e 00 30 00    .1...0.
0050: 2e 00 30 00 2e 00 30 00   ..0...0.
0058: 2c 00 20 00 34 00 61 00   ,. .4.a.
0060: 30 00 38 00 31 00 61 00   0.8.1.a.
0068: 35 00 36 00 2c 00 20 00   5.6.,. .
0070: 6d 00 73 00 63 00 6f 00   m.s.c.o.
0078: 72 00 6c 00 69 00 62 00   r.l.i.b.
0080: 2c 00 20 00 32 00 2e 00   ,. .2...
0088: 30 00 2e 00 30 00 2e 00   0...0...
0090: 30 00 2c 00 20 00 34 00   0.,. .4.
0098: 33 00 33 00 33 00 61 00   3.3.3.a.
00a0: 62 00 38 00 30 00 2c 00   b.8.0.,.
00a8: 20 00 64 00 65 00 34 00    .d.e.4.
00b0: 2c 00 20 00 63 00 33 00   ,. .c.3.
00b8: 2c 00 20 00 70 00 73 00   ,. .p.s.
00c0: 7a 00 71 00 6f 00 61 00   z.q.o.a.
00c8: 64 00 68 00 78 00 31 00   d.h.x.1.
00d0: 75 00 35 00 7a 00 61 00   u.5.z.a.
00d8: 68 00 62 00 68 00 6f 00   h.b.h.o.
00e0: 68 00 67 00 68 00 6c 00   h.g.h.l.
00e8: 64 00 67 00 69 00 79 00   d.g.i.y.
00f0: 34 00 71 00 69 00 78 00   4.q.i.x.
00f8: 68 00 78 00 20 00 4e 00   h.x. .N.
0100: 49 00 4c 00 0d 00 0a 00   I.L.....
 

 

Do you have any ideas?

 

Best regards,

Bestbier

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

Hi Bestbeir,

 

Have you tried running any of the shipping examples?  They can be found at: C:\Program Files\National Instruments\Vision\Examples\dotNET

 

 

Bryan H.
0 Kudos
Message 7 of 9
(4,615 Views)

Bestbier,

do you use any third party controls besides VDM (like infragistics or syncfusion controls) as one of their assemblies might be missing which may cause this problem.

 

Since you installed VDM on this machine, I don't think it is the problem, it might be with Vision Acquisition that I recommend to install too since camera interface is based on it. 

Waleed El-Badry MSc.,MCPD, ISTQB Certified Tester
Assistant Lecturer
Mechatronics Department
Faculty of Engineering
Misr University for Science & Technology



View Waleed El-Badry's profile on LinkedIn

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

Hi Bryan

 

I solved it!

 

The problem snuck it when I had to upgrade from Vision 8.6 to 8.6.4. The only way I know how to do this is to delete the components in the app and the install the new version and the to add the components back into the app. Then give them the same names and the handles back to the procedures. This worked, but the one property that was set in the designer and not in code was the Imaq.Interface property. I was browsing around the program and found it to be set to "NICFgen", I changed it to the correct interface name ("img0") recompiled and installed there we go. I now set the property in the code before I call LoadInterfaceDefaults as a backup.

 

Best regards,

Bestbier

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