LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to the get the count even after we exit the program and start again.

Hi,

 

I have a DAQ program which takes scans every 3 sec, scan number is incremented is been tagged with the filename of each scan. What my requirement is to save that scan number somewhere and get that number the next time I start the program, hence there is no repeatation of the scan numbers ever and I always end up having sequential scan files.

One solution which came to my mind is to save that number in the computer as excel or txt file and read back again the next time I start the program. I am just wondering if there is any better way of doing it.Please let me know.

 

Thanks,

 

Ankit

0 Kudos
Message 1 of 4
(2,370 Views)

well ,

you can get an array of the files in the directory and scan for the highest number....

or use the the ini-file vis to write that number before exit (or after each file written)

log.png

 

here I first wrote the key  ... however I hope you got the key 😉

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 4
(2,363 Views)

Even simpler: Why not use Date and Time in the filename instead of an incrementing number?

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 3 of 4
(2,359 Views)

@Henrik_Volkers wrote:

Even simpler: Why not use Date and Time in the filename instead of an incrementing number?

 


Hi Henrik,

 

I am using the time stamp, but still using the squential scan number is a requirement for me.

 

Thanks,

 

Ankit

0 Kudos
Message 4 of 4
(2,349 Views)