03-25-2010 04:39 PM
I am having an problem with LabVIEW when imaging with a PCI-1428 framegrabber card. I have attached the VI that I am currently using. What I am trying to do is image with the camera, and have the computer save the images as a different name for each image taken (with a .TIFF extension). I have been using a for loop, located in the lower right hand corner of the block diagram, to increase the image number by one every time an image is saved. However, when I have a constant or a control wired to the N value of the for loop, the camera takes one image, then the computer saves that image a number of times (equal to the N). However, this was not the goal of the for loop. Does anyone know what is going wrong, or how I can wire the for loop (or another looping option) such that for every image that is taken it will be then saved and have different name?
Thanks,
Noah
03-26-2010 11:38 AM
Hi Noah,
Thanks for posting! The image reference is a pointer to a memory location so everytime an image is taken, it overwrites the data in that memory location. When your while loop is complete, the image location contains the last image taken and that is what I suspect is being saved repeatedly.
If you save to file while inside the while loop that should save whatever image is currently in that memory location.
I hope this helps.
03-30-2010 12:02 PM
Hi Tejinder,
Thanks for your input. Are you saying that if I put the save function (the various blocks that I am currently using) in the first while loop, that the images will be saved properly? If not, do you have any ideas on how I can set up a loop in the VI so that every image that is taken by the camera gets saved?
Thanks,
-Noah
03-31-2010 10:37 AM
Hi Noah,
If you save inside the while loop it will be saving whatever image is currently in that memory location. And each time the loop iterates the memory location contains the next image and therefore each time the save function is called it will save a new image.
04-01-2010 06:39 AM