LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

correct/change information format in the header

Hi all,

I collect data with a DAQ and store it in binary files just like in the ContAcq&GraphVoltage. There is a 'create header.vi' there which add to the binary file information about time and about the scaling parameters. You all must have seen how a file like this (and in particular  the header) looks like after conversion to text:
-----
waveform    [0]    [1]    [2]
t0    1/1/1904  02:00:00.    1/1/1904  02:00:00.    1/1/1904  02:00:00.
delta t    0.000100    0.000100    0.000100

time    Y[0]    Y[1]    Y[2]
1/1/1904  02:00:00.    6.945491E-1    8.289447E-1    8.544058E-1
1/1/1904  02:00:00.    6.939045E-1    8.295893E-1    8.589178E-1
1/1/1904  02:00:00.    6.932599E-1    8.289447E-1    8.634299E-1
1/1/1904  02:00:00.    6.942268E-1    8.289447E-1    8.614962E-1
1/1/1904  02:00:00.    6.945491E-1    8.295893E-1    8.582733E-1
1/1/1904  02:00:00.    6.945491E-1    8.308785E-1    8.660083E-1
.....
-----
There are 2 questions I am dwelling on:
1.  The first column does never change regardless the files regardless the date of the recordings. I suppose it should be the date but it;s always the same. The second column which corresponds to the clock(hour'minute'second) always starts from 02:00:00. Why not 00:00:00?
2. I would like to have the clock format only in miliseconds. First, it is more manageable , second, with the current format, Matlab has problems in separating data columns.

Do you have some solutions for me? I would very appreciate that.

Thank you in advance,
Dana
0 Kudos
Message 1 of 5
(2,850 Views)
The only example that I could find in 8.5 that writes a header is called Cont Acqu&Graph-To File(Binary) and in the header, there is no date/time recorded. Are you talking about a different example or a different version of LabVIEW? How are you converting the binary to text? Posting the actual code would be the best way to figure out what is going on.
0 Kudos
Message 2 of 5
(2,836 Views)
Hi Dennis,

Thank you very much for your response. Indeed, I am talking about Cont Acqu&Graph-To File(Binary).vi . And if that is not the data, what is that information contained in the first two columns of the text file? I hesitated to attach the code because it's messy due to further developments; I will attach it if you think is relevant. The conversion to the text file is done Saved Graph Acquired Binary Data.vi, so no customization or personal signature.
If that one is not the date, do you have an idea how I can have this information in the header, and how to timestamp the samples acquired, with the millisecond offset from the base-time?

Kind regards,
Dana
0 Kudos
Message 3 of 5
(2,825 Views)

How exactly are you creating the text files? The VI you attached creates binary files. There is no subVI called Saved Graph Acquired Binary Data.vi and I can't find this in my 8.5 LabVIEW.

In order to save timestamp data, the best way (imho), is to acquire a waveform datatype. With 8.5, you have a shipping example called Cont Acq&Graphs Voltage - Write Data to File (TDMS). I never used 8.0 so I don't know if you have this example

0 Kudos
Message 4 of 5
(2,815 Views)
So, I checked and there is no Cont Acq&Graphs Voltage - Write Data to File (TDMS) coming with the 8th version of LV. Nonetheless, I have the TDM as an I/0 alternative storage. Is this TDM much the same thing with TDMS?
I read about TDM that are not recommended to be use in real time application o high-speed acquisition of the data. This would also be my case. Also read, that I can store data in binary format and afterwards use
LabVIEW TDM Header Writer VIs.. which I don't have in this LV version... to convert the binary data to TDM. Now should I infer from all these that the binary data contains the time information, but it needs an appropriate converter in order to display it?
Here's the source of information I used:
http://zone.ni.com/devzone/cda/tut/p/id/3542

All the best,
Dana


0 Kudos
Message 5 of 5
(2,809 Views)