LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

System time in Write TO Measurement File

Hi, everyone. I'm Sorin.

I use a DAQ 6210 in Labview 8.2 to aquire some analog data at 1 sec,and i have 2 questions, please:

1. I need to record the data into a file .lvm, so i use "Write TO Measurement File" module with one column of time (X axe). But this time is relative, and i want to be system time instead. Is there any way to resolv that ?

2. Also, in my Waveform Chart i put absolute time because i couldn't find system time, though i need it. How can i change that ? Although, once i played with charts, and i succeeded to see system time, but now i can't. And i'm sure it wasn't complicate. 

 

0 Kudos
Message 1 of 17
(4,889 Views)

The Write to Measurement File does save the start time so that information is available in the file. The function could be modified, in theory. Right click on it and select Open Front Panel. This will convert it to a regular VI. You also have the option of using Export Waveforms to Spreadsheet File or writing your own file save with the lower level File I/O functions.

 

I don't understand your question about absolute time versus system time. They are usually considered one and the same.

Message 2 of 17
(4,862 Views)

Hi.

I played again and now I see in waveform charts system time (actual time from my computer), not the absolute time (from 1904). I don't know what i have done.

The function Write to Measurement File , indeed can be modified (in theory), i changed the time string (the one with %), but then it can't be reused in my application. Maybe I have to save it, and then loaded when necessary.

I used instead "Export Waveforms to Spreadsheet File" and it works.  Thankyou for tip. Now I can see the system time in format: HH:MM:SS, but no miliseconds ?   And by the way, how can i change the header in file ? ( I want to write labels for columns)

 

Thanks again.

0 Kudos
Message 3 of 17
(4,842 Views)

I see milliseconds when I use the Export Waveforms to File. What version of LabVIEW are you using. I see to recall a bug in the Waveform Time to Date Time String function that is one of the subVIs called.

 

If you a differrent header, you will have to modify the VI. If you do, be sure to save it with a new name and in a new location.

Message 4 of 17
(4,830 Views)

Hi Dsasorin,

 

You can definitely use the Export Waveform to Spreadsheet.vi. To show milliseconds in your format please refer to this discussion thread. You should be able to see milliseconds anyway if you are using LabView 8.5 and above. Regarding changing the headers, if your header terminal is set to true and you are appending all data to the file, you should be able to see the titles you give to your waveforms. 

 

Ipshita C.

 

National Instruments
Applications Engineer
Message 5 of 17
(4,816 Views)
In a posting to this discussion, one of the respondents reported that the Export Waveforms to Spreadsheet File.vi will produce a file that contains time to the millisecond.  However, when I try to reformat the time stamp column of the file it produces, I find that the time resolution is only 1 second.  In a sample file where data was acquired at a sampling rate of 1 kHz, I converted the time column format from mm/dd/yyyy hh:mm:ss to numeric format, keeping as much resolution as was available.  I got a column of numbers in which every number was 39707.4990625. Plotting the data results in a vertical line since all x values are identical.  Do I need to tinker with the vi?
0 Kudos
Message 6 of 17
(4,764 Views)
Could you answer the question about what version of LabVIEW you are using? There was a bug in Waveform Time To Date Time String.vi in earlier versions. I don't remember the fix but it had to do with the time format string.
Message 7 of 17
(4,755 Views)
I'm using version 8.0
0 Kudos
Message 8 of 17
(4,752 Views)

Hi Sir

I had similar problem. I tried to write to a measurement file with absolute time, instead of relative time here I got.

Also, I want the format to be sth like this 13/09/25 18:16:01.

Could you help me?

Thanks

 

 

LabVIEW Measurement
Writer_Version 2
Reader_Version 2
Separator Tab
Decimal_Separator .
Multi_Headings No
X_Columns Multi
Time_Pref Absolute
Operator FriedmanLab
Date 2013/09/25
Time 14:09:10.2151017189025878906
***End_of_Header***

Channels 1
Samples 1
Date 2013/09/25
Time 14:09:10.2151017189025878906
X_Dimension Time
X0 0.0000000000000000E+0
Delta_X 1.000000
***End_of_Header***
X_Value Untitled Comment
0.000000 21.787387 Enter a description
10.000572 21.847446 Enter a description
20.001144 21.841562 Enter a description
30.000716 21.908628 Enter a description
40.001288 21.902826 Enter a description
50.004860 21.963112 Enter a description
60.035434 21.967730 Enter a description
70.031005 21.968933 Enter a description
80.011576 22.039718 Enter a description
90.000148 22.065121 Enter a description

 

 

 

 

wei shen
0 Kudos
Message 9 of 17
(3,846 Views)

Did you try the suggestion in this thread?

 

If you want to use an Express VI, you have to live with the limitations of not doing any programming. Use the other function or write your code with the numerous other file I/O VIs.

0 Kudos
Message 10 of 17
(3,840 Views)