LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save an image when clicking a button (with a numerical filename)

Hi again

Ok I found it, sorry.
How can I adjust this code so that I can save pictures while I'm running the program? So if I click that button 5 times, it creates 5 different pictures.

 

Thanks

0 Kudos
Message 11 of 15
(1,222 Views)

Hi you can learn a lot by studying the NI standard report VIs. Take a dive into the code for the VIs I have marked with red circle. Just remember to use the "save as" option then saving so you do not overwrite the original.

 

Message Edited by t06afre on 04-20-2009 01:37 PM


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 12 of 15
(1,219 Views)

986521345 wrote:

Hi again

Ok I found it, sorry.
How can I adjust this code so that I can save pictures while I'm running the program? So if I click that button 5 times, it creates 5 different pictures.

 

Thanks


This has already been answered several times. Use a shift register to keep track of a counter. Each time you click the button increment the count. Append the count to your filename. 

0 Kudos
Message 13 of 15
(1,206 Views)

Hi,

 

you should really take advice! (Like smercurio: the answer has been given before...)

 

The time format you use only includes hours and minutes, but no seconds or parts of seconds. Include them and you will have no problems... (Hint: use the format string I gave in one of my earlier posts!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 15
(1,196 Views)

GerdW wrote:

but no seconds or parts of seconds. Include them and you will have no problems... (Hint: use the format string I gave in one of my earlier posts!)


Indeed. With seconds included as part of the filename you won't even need to use a counter, as it's unlikely you will be pressing the button multiple times each second (unless you imagine yourself waiting for an elevator and the button is already lit). Smiley Wink

0 Kudos
Message 15 of 15
(1,188 Views)