LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I determine programmatically the total number of records stored in a datalog file?

I am running LabVIEW 6.1 on a WinXP platform. My general goal is to incorporate a "rewind" feature into a "main" VI I am writing. Specifically, I want to reload the contents of a subVI via the "Enable Database Access" feature (the subVI is set to "datalog on completion"). To index the correct record number, I need to be able to programmatically access the total number of records stored in the datalog file created by "log on completion."
0 Kudos
Message 1 of 3
(2,591 Views)
You can index the datalog entry from the earliest entry, or latest entry. Positive values are relative to the first entry, and negative values are relative to the last entry. A record # of -1 will return the last entry, -2 is the second to last entry, etc.

To find the number of entries, you will need to create a while loop, while the "i" index to the record # input and to the edge of the loop and the "invalid record #" to the termination condition (stop if true). The output of the while loop will be the # of records in the datalog file.
Message 2 of 3
(2,591 Views)
Thanks, David!
0 Kudos
Message 3 of 3
(2,591 Views)