From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquire using IMAQ Frame Grabber w/ Visual Basic .NET

Hello All,
I have a PCI-1408 frame grabber and I can acquire frames with the NI instrumentation software (non-standard camera).  I want to use VB.NET to acquire frames as well.
 
I tried to use the VB.NET demo (the  "hardware" one) that came with the software but it is crashing on any line that begins with
CWIMAQ1. Where CWIMAQ1 is the name of the acquisition window.  
 
I also get the following error when i run the program "Error loading control. The default setting for the control will be used"
 
I have two questions.
1) Why is the program crashing
2) Where is the setting for the window in VB so that the program is set to the specific frame grabber and channel?
 
Thank you,
Jomile
0 Kudos
Message 1 of 6
(3,805 Views)
Jomile,
 
    I may need some more information about your setup before I will be able to help much.  First off, I see that you have a 1408, what kind of camera do you have (manufacturer, color or not, etc)?  Second, what NI software do you have?  If you go to Start >> Programs >> National Instruments, you should see a program called Measurement and Automation Explorer (MAX).  If you can't find it, let me know.  Open MAX, and expand the Software list, it will display all of the NI software that you have installed.  Finally, I'm not sure which program you are referring to, where is this program located (did you find it online or on your computer, what is the path)?  I'd like to see if I can find the program to look at it so that I can see what may be causing this issue.  Let me know if you have anymore questions, thank you!
 
-Allison S.
Applications Engineering
-Allison S.
Calibration Services
Product Support Engineer
0 Kudos
Message 2 of 6
(3,795 Views)
Hi Allison,
Thank you for your response.
 
I am using a non-standard camera and sending in the timing signals to the card.
 
Measurment & Automation Version 4.1.0.3001
 
The program is the demo that was installed in the folder
C:\Program Files\National Instruments\NI-IMAQ\Sample\MSVB.NET\Getting Started
it is called "hardware.vbproj"
 
The interesting thing is that i can acquire images just fine in the Measurment and Automation software but not in the VB project.
 
Thanks again,
Jomile
0 Kudos
Message 3 of 6
(3,783 Views)
Jomile,
 
    Ah, well all of the CWIMAQ calls are part of the ActiveX communication between IMAQ and VB.  Are all of them giving errors?  If so, it sounds like support for VB was not properly installed with your IMAQ driver.  Try going into Add/Remove programs and click on National Instruments.  Find IMAQ and choose modify.  It will give a list of all of the support IMAQ has installed.  Make sure that support is installed for VB.  If it already is, then try uninstalling and reinstalling your driver.  Let me know how that goes! Thanks!
 
-Allison S.
Applications Engineering
-Allison S.
Calibration Services
Product Support Engineer
0 Kudos
Message 4 of 6
(3,755 Views)

****Solution*****

Hi Allison,

I tried a few times to repair and uninstall/reinstall the software with no luck.  POI: The original problem came about when i upgraded to the latest version.

I found that if i uninstalled the software in safe mode and manually removed the NI data from the application data folder and the c:\program files ... as well as removing the National Instrument registry components for the cwimaq and then reinstalled the driver then everything works with Visual Basic again.

Jomile

0 Kudos
Message 5 of 6
(3,745 Views)

Jomile,

    Great!  I'm glad to hear it.  Let us know if you have anymore questions, and hopefully this will all work out for you from here on out!

-Allison S.

Applications Engineering

-Allison S.
Calibration Services
Product Support Engineer
0 Kudos
Message 6 of 6
(3,730 Views)