LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting an unordered datalogfile when writing timestamps and datavalues to file??

Hi all
I get measured dat afrom a device, with thése data i need for every data value its timestamp in millisec. precision.
Then i need to write the measurements and their dátavalues to a datalog file.
an example of the file i want it to look like this, example:
 
Date/time                                    datavalues
25-01-2006.10:55:23:485            -113
25-01-2006.10:55:23:485             210
25-01-2006.10:55:23:485             305
25-01-2006.10:55:23:485            -145
 
but after writing to a file i get
several  timestamps per line and sometimes severeal data per timestamp ect.
Take a look at the jpg file to see the problem.
 
thanks!!
Regards Zamzam
HFZ
Download All
0 Kudos
Message 1 of 4
(2,574 Views)
Try using an End of Line Constant to terminate each line of data instead of the Carriage Return. EOL should work on all platforms and be interpreted correctly by all applications that read text files.
Message 2 of 4
(2,561 Views)
Hi, HFZ:

1.- Replace the String Constant '%c, ' with '%3c' and timestamps will look ok
2.- Write to file only if you have data to write (you can check if I16 array size is bigger than 0). You can replace the Case you use only for sync with a bigger case that contains the transformation of I16 array into spreadsheet string and the writing to file.
3.- If you need floating point numbers, you'd better transformate I16 values to Float or DBL, otherwise '%.3f' constant is no use.

Hope it helps,
Aitortxo.
Message 3 of 4
(2,557 Views)

Thanks for the help guys,

What can i do with out ya'

Regards

Zamzam

HFZ
0 Kudos
Message 4 of 4
(2,536 Views)