LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

logging real-time data into the text file using time of pc

Hi,


I have a simple VI which acquires waveform data from a single channel and writes to a text (.lvm) file.


Please see the VI attached.


The format of the text file is as follows (as an example, for sampling rate 1000 Hz):


Time (s), Value
0, 5
0.001, 6
0.002, 4
----------
----------


However, I want the VI to write actual system time while logging data into the text file. Example shown below:


Time (yyyy/mm/dd HH:MM:SS.FFF), Value
2012/09/10 13:31:23.000, 5
2012/09/10 13:31:23.001, 6
2012/09/10 13:31:23.002, 4
---------
---------

 


I would be grateful if you could help me with this problem.


Thanks!

0 Kudos
Message 1 of 5
(2,843 Views)

Typically, you would use the base functions for Data acquisition and Logging to file.  Using the base LabVIEW functions gives you more flexibility. (Way more than using express VIs). I would not use the Write to Measurement file express VI, but use "Write to spreadsheet" VI. 

Certified LabVIEW Architect
Certified Professional Instructor
0 Kudos
Message 2 of 5
(2,697 Views)

I will provide more info later.  

Certified LabVIEW Architect
Certified Professional Instructor
0 Kudos
Message 3 of 5
(2,694 Views)

See here  Time to xl  (converts time from the LabVIEW scale and epoch to the scale and epoch used by Excel.  you do have to manually set the cell formating to time/date in ecxel to view the number as YYYY/MM/DD HH:MM:SS format

Don't forget to kudos the idea here 
the excel Format specifier for your example would be "yyyy/mm/dd h:mm:ss.3" without the quotes

 

Spoiler
(How bout that? three in one day!)  Smiley Very Happy

"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 5
(2,688 Views)

 

cool suggestion Jeff

Certified LabVIEW Architect
Certified Professional Instructor
0 Kudos
Message 5 of 5
(2,681 Views)