LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I save an image with an incremented filename?

I am new to LabVIEW and am working on acquiring and saving many 12 bit images.  So far I have a File Dialog box to allow me to select the path to save the file. After I select the path, how can I make each image acquisition filename after that increment by an integer and save automatically (i.e. image1, image2, image3, etc)?
0 Kudos
Message 1 of 6
(3,536 Views)

You can built a string as shown in VI attached and convert it to a file path.

Now think of a logic how to increment this image number in your program, for each new image

any doubts, do get back

Regards

Dev

 

0 Kudos
Message 2 of 6
(3,522 Views)
I've attached a VI that I built for doing just this. It makes calls to the OpenG library (something which everyone doing LabVIEW should have and it's free!) so I've included those as well.
0 Kudos
Message 3 of 6
(3,509 Views)
Thanks Warren for the VI. I'm new to labview so please bear with me. Just to make sure I understand what's going on in this VI, the first time the program runs, the "error" case structure runs, and then subsequently, the "No Error" diagram runs?
 
Thanks again for your help.
0 Kudos
Message 4 of 6
(3,493 Views)
Hey jpyung,

The Case structure is going to select a case depending on if an error is present or not.  If there is no error then the "No Error" case will run.  If there is then the other case will run.  If you had a Sequence structure then you could expect the frames to execute sequentially.  Let us know if you have any questions.

Thanks!
Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 5 of 6
(3,478 Views)


@jpyung wrote:
Thanks Warren for the VI. I'm new to labview so please bear with me. Just to make sure I understand what's going on in this VI, the first time the program runs, the "error" case structure runs, and then subsequently, the "No Error" diagram runs?

The error case should only run if there has been an error.  I've attached a demo program (LV v7.1.1). Put it into the same folder as the "Generate Next Filename" vi and run it or watch it run. If you don't change it any before running it, the first time it is run it will create a subfolder in the folder containing the VI and then add 10 sequentially-numbered text files to it. The next time it is run, it will add the next ten files in the sequence and so on.

Message Edited by Warren Massey on 03-13-2006 01:46 PM

Message 6 of 6
(3,470 Views)