Showing results for 
Search instead for 
Did you mean: 

camera grab, attributes and saving images

Hi there,

I have a AVT gigE camera and would like to be able to grab images continuously and by trigger events. I also need to change camera settings between runs (exposure time, trigger on/off etc). and would also like to save images to a folder when a true statement is given.

For this i have tried to modify the LabVIEW example "Grab and Attributes" to add a section for saving images to a given folder.


However there are issues when first running the camera. If the record button is instantly armed and then grab is executed, twice the amount of images are saved than what is seen by the camera. Consecutive runs give the correct amount of saved images. Also, when recording to folder is armed and images are grabbed, if the grab is turned off then started again there will be a gap of 2 in the image filepath numbers in the saved folder.

Could anyone help me with this?




0 Kudos
Message 1 of 4

Hi Rhysj,


Have you tried doing all this in Vision Assistant? It has a very easy to use user interface and you can generate your own LabVIEW code in the software.


You mentioned that there are twice the images saved when the record button is instantly armed, are they repeated images or are they taking more frames than specified? 


With regards to the gap of 2 in the image filepath, try running the highlight execution tool to see what happens when it skips an increment of the numbers. This may give you a better idea of what is happening with the data wires.

Applications Engineer
National Instruments
0 Kudos
Message 2 of 4

I would actually recommend using the Vision Acquisition Express VI. It uses a nice API to set camera attributes and also supports image logging.

Once the code is generated inside the Express VI, you can still "Open Front Panel" to see how it is implemented in LabVIEW.



0 Kudos
Message 3 of 4

Thanks Jinfone and Christophe

I think i managed to correct the problem.

The first set of images were doubled (duplicate images rather than the camera taking more images than it should) due to the VI counting the first images on initialisation, before entering the while loop, and them counting them again once entering the while loop. Removing the frame done property node before the while loop solved this.

The file log numbering has also been fixed too.


I had a look at the acquisition express VI. It looks nice but I also quite like having all the attributes available on the VI so i will stick with this for now but may look at changing it later on.


I've attached an updated version of the VI that should work as a camera aquistion and image logging program for gigE cameras.

Any feedback would be nice as things may not be as efficient as they could be




0 Kudos
Message 4 of 4