Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Snap Image with IMAQ

Hi,

 

For some reason, I am unable to talk to the camera I have setup from LabVIEW.

 

If I go to NI-MAX, I can see all of the features of the camera and can directly grab/snap images, but when I use the snap example vi, I get an error: Error -1074397163 occurred at IMAQ Init.vi

 

I took the LabVIEW example snap VI under IMAQdx and just replaced the functions with normal IMAQ VIs, dont know what went wrong. 

 

I need to snap images and save them as BMP files, any help?  

 

Side question:

How do I trigger the camera to snap every X nanoseconds and save the image with a certain filename (e.g. pic1.bmp, pic2.bmp, pic3.bmp, etc.)?  A for loop would be useful for the filename part I guess, but a while loop may be better for minimizing delays when triggering the camera for a time-sensitive matter...?

 

I apologize for these basic questions, I only have experience using LabVIEW for pure coding purposes.

0 Kudos
Message 1 of 4
(4,724 Views)

Ok, figured out the first part of my problem... just had to look at IMAQ examples instead, whoops.

 

Any answers for the side question?

0 Kudos
Message 2 of 4
(4,712 Views)
That completely depends on the camera and other hardware you have. Nanoseconds, no way, millisecnds maybe.
greetings from the Netherlands
0 Kudos
Message 3 of 4
(4,706 Views)

Hi Max,

 

This forum post shows some example code for setting up your application to save images to a folder.

 

For setting up your acquisition, I suggest you start by looking over some of our shipping examples. Go to Help > Find Examples > Hardware Input and Output > Vision Acquisition > NI IMAQ.

The File Input and Output examples show how to save your images to file, and the Signal Input and Output examples show how to set up triggering. By combining these concepts you should be able to implement the application you want.

 

As Albert said, the frame rate will depend on the hardware you have. You'll need to check the specifications of your camera for the maximum frame rate. You could either do a Grab, and use this framerate setting, or set up your application to do Snaps at a speed within that frame rate.

 

I hope this helps!

Emily C
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(4,669 Views)