Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

imaq 1394 visual studio 2010

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

0 Kudos
Message 1 of 18
(4,507 Views)

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.

19237i6E14627B939120F1

 

Hope it helps

Have a lovely day

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 2 of 18
(4,502 Views)

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

0 Kudos
Message 3 of 18
(4,496 Views)

Exactly

You will find CWIMAQViewer control added to your toolbox. Did you open the shipped examples of NI IMAQ VDM in VB.NET?

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 18
(4,487 Views)

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

0 Kudos
Message 5 of 18
(4,480 Views)

Forgot to mession, this is under Windows 7.

0 Kudos
Message 6 of 18
(4,459 Views)

Hi xianmin,

 

Did you target your new project for .NET Framework version 3.5?

 

19333iBEB31675C0C93712

 

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.

0 Kudos
Message 7 of 18
(4,428 Views)

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

0 Kudos
Message 8 of 18
(4,422 Views)

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.

 

0 Kudos
Message 9 of 18
(4,399 Views)

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

0 Kudos
Message 10 of 18
(4,397 Views)