Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make VB6 recognize the cwimaq.ocx file?

Hi

I'm using a VB6 program written a year ago which communicates with a IMAQ IEEE-1394 camera.
Every time I load the project in VB6 it gives me an error stating that it couldn't load the cwimaq.ocx file:

'C:\<directory of program>\cwimaq.ocx' could not be loaded--Continue Loading Project?

Another error that has appeared is that it couldn't load the CWIMAQHlpBtn.ocx file.
My VB6 installation was installed before my LabVIEW 7.1 installation. In the Device controller for LabVIEW I can easily aquire images from the camera.

When running the program I can aquire images from the camera, but as soon as I try to process the threshold VB6 tells me that I am using an unlicensed version of IMAQ. Since I have registerred my version of IMAQ electronically and restarted the computer before using VB6 this has me puzzeled. LabVIEW license manager states that the product is licensed for my computer forever.

I know that I have the cwimaq.ocx file in my \WINDOWS\system32\ directory. I found another version of the cwimaq.ocx file on the ni site, but it changed nothing. I've contacted the programmer who made the program and we can't seem to find the solution.

I'm running the program on another (newer) computer than it was run on last year. I've checked and the program works fine on the old computer and all the files are identical.
I've tried to copy the cwimaq.ocx file into the program directory, but that didn't work.

Does anyone have a guess as to a solution?

Thanks in advance

The Enthusiastic Student
0 Kudos
Message 1 of 3
(8,325 Views)
Hello

    So I don't know if I know enough about what you are doing yet.  My first thought is that on the older computer you had the IMAQ drivers and the Vision software licensed and when you moved to the new computer you ended up only registering/licensing the IMAQ drivers, which is the most obvious part. If you are simply using the IMAQ acquire functions these are free but if you are trying to use Vision analysis functions this requires a separate license.  You could read this KB.. 2GB9018M (by searching at www.ni.com) and see if anything there helps.
     Next, what do you mean the "device controller" for LabVIEW?  You mean Measurement and Automation Explorer? If you could tell me what order you've installed everything in that would be great and is everything the save version on each of your computers? Also, to check and see if your software is licensed you can go to the NI License Manager and look to see whether your Vision Software and the 1394 driver are clear.  I would bet that you've licensed the 1394 drivers but not Vision. Anyway, that is a lot of info and a pretty good start.  If you could look into all that and let me know I'd appreciate it.  Thanks

John H
Applications Engineer
National Instruments
http://www.ni.com/support
Message 2 of 3
(8,319 Views)
Hi John

The program now works! I had not installed the Vision software at all since I thought that was just a collective name for the LabVIEW drivers dealing with images. After installing the Vision software and registering everything worked with no problems.

The article from the knowledge database specifically mentioned:


2.The NI-IMAQ shipping examples for Visual Basic use the CWIMAQViewer, which is a part of the IMAQ Vision package. You must either purchase IMAQ Vision for Measurement Studio (linked below) to use the CWIMAQViewer, or you can use the native Visual Basic picture control for display. However, the native Visual Basic picture control will not have all the functionality of the CWIMAQViewer. The example below Illustrates how to use the picture control to get full frame rates without using IMAQ Vision.


The part about the CWIMAQViewer got me on the right track since I had seen references to this in the code.

To clarify my first post then: yes, instead of "device controller" I should have written "Measurement and Automation Explorer".
The order that I installed everything in was: VB6 -> LabVIEW 7.1 -> LabVIEW 7.1 Drivers -> NI Vision.
The last was, of course a recent addition thanks to your advice.
I had already checked the licenses for all my LabVIEW parts, but since Vision was not installed it was not present in the LabVIEW License Manager.

Thank you so much.

The Enthusiastic Student
0 Kudos
Message 3 of 3
(8,313 Views)