07-18-2010 01:31 AM
Is it possible to develop VB.NET app with Visual Studio 2010 using IMAQ with 1394 camera (AVT Pike 505B)?
I see that in VDM there are 2 .net installers for 2005 and 2008. Does VDM only works with these 2 versions of Visual Studio?
Thanks,
Xianmin
07-18-2010 04:55 AM - edited 07-18-2010 04:56 AM
Hi xianmin,
If you use VDM, then you can easily add IMAQ components from toolbox and add components. select .NET components and choose IMAQ viewer.
Hope it helps
Have a lovely day
07-18-2010 06:18 AM
Thanks for the reply, I actually did this. Then I don't know what next. How do I use it? Again I am not a .net programmer (java). In VB I think you can drop a control on the form, is it the same way in VB.NET?
Thanks,
Xianmin
07-18-2010 12:57 PM
07-18-2010 10:13 PM
I created a new project in VS2010, select Tools -> Choose Toolbox Items. Now I see the window in your first reply. I found 2 NI entries and selected them. But I can't find anything in the Toolbox.
I then tried to use Browse in Choose Toolbox Items and load the dlls from Vision/dotNet/Assemblies/9.0.0.0 and Current, one at a time. In both cases the code won't compile. But I do see 3 SWIMAQxxx entries in the toolbox.
When you say shipped examples do you mean the ones in Vision/Examples? There are no .NET examples, only VB6 and MSVC.
Thanks,
Xianmin
07-19-2010 03:50 AM
Forgot to mession, this is under Windows 7.
07-19-2010 05:43 PM
Hi xianmin,
Did you target your new project for .NET Framework version 3.5?
When I select .NET Framework 4.0, I don't see the controls. With 3.5 selected, I can drop the control from my toolbox.
07-19-2010 07:14 PM
Kyle,
Thanks, that helps. Now I change target to .net 3.5, i do see 2 image viewers in toolbox after I picked them in Choose toolbox items. I don't know there are 2. I can drag it to the form and the app runs.
I then tried to user Browse in Choose toolbox items and selected NationalInstruments.AxCWIMAQControlsLib.Interop.dll in Vision/dotNet/Assemblies/9.0.0.0.
Now I see 3 CWIMAQ controls in the toolbox. I put the CWIMAQ in the form. First when I check its property, I can't see all camera interfaces. I just typed in "cam2". Run the app, it is up. Close it, it crashes Visual Studio. It happen 2 times in a roll.
Maybe this is not the way to use IMAQ?
Thanks,
Xianmin
Windows 7, Visual Stuodio 2010, VAS2009
07-20-2010 05:38 PM
Hi xianmin,
Now I see 3 CWIMAQ controls in the toolbox. I put the CWIMAQ in the form. First when I check its property, I can't see all camera interfaces. I just typed in "cam2". Run the app, it is up. Close it, it crashes Visual Studio. It happen 2 times in a roll.
Visual Studio crashing is definitely not a good thing, but the problem could be from incompatibility issues with Visual Studio 2010, which released after the Vision Acquisition Software, or something else. I would need to do more testing to find out.
Maybe this is not the way to use IMAQ?
Do you have the .NET examples installed? I have them located on my machine at C:\Users\Public\Documents\National Instruments\NI-IMAQdx\Examples\dotNET . While the majority of examples are written in C#, you should be able to port them to VB.NET. If you don't have these examples installed, you can get them by re-running the Vision Acquisition Software installer and checking the .NET support and examples for installation.
07-20-2010 05:58 PM
Kyle,
I will try to locate them and see if they work or not. I also tried Measurement Studio Visual Basic Demo. It doesn't work either. The IMAQ control doesn't show anything configured in MAX.
I am getting a new PC with XP and I will install everything fresh and see if it works. I will try to make VB6 works first. But I do hope that I can use newer things like vb.net or c#. If NI or someone else can provide me a list of things I need to have to make it work that would be great.
OS
development tools such as Visual Studio, .
net framework,
NI drivers.
what exmaples to run
Again I need to have vision and measurement studio. I have a 1394 camera and a USB-6211 for control.
Thanks,
Xianmin