LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving png photos with different names..

Solved!
Go to solution

Hello guys,

I am not not so familiar with Labview so i would like some help. I have a Vi which is actually controlling 32 RBG lights.We use DMX protocol..everytime one led is on then we take a picture and then the led goes off..Then the second goes on end so on..we have 8leds in 4corners..So we have corner1_led1,corner1_led2 untill corner4_led8 .So in the end we have 32 png photos saved.What i want is to save the photos with different names and the numbers to start from 1 instead of 0.. For example if we select white light and  save the images as "new" the images are going to be named "new_white_0_0" instead of "new_white_1_1" . Do you have any idea how i can change it?

 

Attached current photos names and Vi. 

Any comment would be helpful.

Thank you.

 

Download All
0 Kudos
Message 1 of 3
(2,455 Views)
Solution
Accepted by MAGI2

The indexing terminal (the [ i ] in the for loop) starts at 0. When creating your filename, use the "increment" primitive from the numeric palette. Then your file names will start at 1 instead of 0.

 

I noticed from your VI that you do a lot of string concatenation to build the file name/path, you can use the format into string and build path VIs to make the block diagram look a little simpler. You could also update the deprecated functions (e.g. the open file) with the modern equivalents.

 


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 2 of 3
(2,449 Views)

Sam_Sharp, i made the changes and the numeration starts correctly.Thank you very much for your help.I will also try the rest of your suggestions.

Have a nice day!

Thnx again!

Smiley Happy

0 Kudos
Message 3 of 3
(2,435 Views)