LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

save 10 png images in one minute

Hi,

 

I have basic knowlegde of how to use labview and I like labview very much. therefore, I am desperate to know how to save several (at least 10) png images (using wrtite to PNG vi) in a directory in a minute. any help would be greatly appreciated.

 

Thanks

0 Kudos
Message 1 of 12
(3,954 Views)

Yes the Write to PNG File functions within the picture palette.

 

Whare are you having problems?

0 Kudos
Message 2 of 12
(3,941 Views)
I have done all the connections from a pitcure to pmg write vi. it saves only one image as soon as the program starts. I want to save ten pitcures in one minute after some interval.
I tried to use build path vi then concencate strings bit still sint work.
0 Kudos
Message 3 of 12
(3,937 Views)

Show your VI so we can see what you've done.  What timing functions have you tried to use in your loop?

0 Kudos
Message 4 of 12
(3,933 Views)

please see the attached png as my vi to save 10 images in a directory. so far I did not implement the timed saving option becasue I plan to do that once I am able to save at least 10 ong images.

 

Thanks in advance

 

0 Kudos
Message 5 of 12
(3,849 Views)

Hi naserkhan,

 

the filename never changes, so you write the same file several times. (Why do you need a FOR loop to generate a file name like "01234.png"? Why do you need to build filenames using string functions whenn all you need is StripPath and BuildPath?)

Is the filepath you generate correct in all parts? Did you (double-)check that?

 

How often does your loop iterate per minute?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 12
(3,833 Views)

HI GerdW,

 

I understand the error of not changing the name (01234) . my plan was basically to generate and save 5 images (as a start) 0.png, 1.png, 2.png etc. I also tried to put everything in the for loop but still din't work. I think I can figure out how to generate file names etc. so can you please explain how can I can save multiple images with different names in a directory.

 

Thanks in advance

0 Kudos
Message 7 of 12
(3,819 Views)
Hi,

You need to call WritePng several times with a different filename each time!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 12
(3,795 Views)

Dear GerdW,

I have managed to save 5 images in a directory. Thank you for your guidance. Now I am stuck at how to save these images after a specific time interval. However, there is a condition of not slowing down the rest of the program. I tried using tthe 'wait until next ms' VI but this slows the whole program. Any help woul dbe appreciated.

 

Regards

0 Kudos
Message 9 of 12
(3,789 Views)

Use parallel loops, one loop for saving files, and the other one doing the rest operations. You can communicate between the loops via a Queue for example.

You clearly need to learn a lot more, here you can find useful learning material:

http://forums.ni.com/t5/LabVIEW/Idiom-for-initialising-a-sub-VI/m-p/3086564/highlight/true#M882347

0 Kudos
Message 10 of 12
(3,783 Views)