From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

issue with time in 'write to measurement file'

I am using Labview 8.6 SE to pick up information from a serial port connected anemometer.  I am using the 'Write to measurement file' express VI to write the data to file.  The write to measurement VI does everything I need it to do and fairly simply, so I am not interested in making my own function to do this.  (this tends to be people's responses when issues come up with express VI's).

 

The only issue that I am having with the spreadsheet files that it makes is that the time does not work at all.  Every sample that it collects says that the time is 12/31/1903 at 17:00:00.  It is outputting different values each sampe though, so I know that it is not simply outputting the same thing over and over again.

 

Any help on this issue?  My VI is attached for your reference.

0 Kudos
Message 1 of 7
(3,065 Views)
Are you using Excel to read the file? If so try to format the cells to the correct time format you want in excel.
0 Kudos
Message 2 of 7
(3,058 Views)
That is a complex problem. I am not sure why time is not coming out but I did put in a fix. I hope it helps.
Tim
GHSP
Download All
0 Kudos
Message 3 of 7
(3,049 Views)

bradenrooke wrote:

I am using Labview 8.6 SE to pick up information from a serial port connected anemometer.  I am using the 'Write to measurement file' express VI to write the data to file.  The write to measurement VI does everything I need it to do and fairly simply, so I am not interested in making my own function to do this.  (this tends to be people's responses when issues come up with express VI's).

 

The only issue that I am having with the spreadsheet files that it makes is that the time does not work at all.  Every sample that it collects says that the time is 12/31/1903 at 17:00:00.  It is outputting different values each sampe though, so I know that it is not simply outputting the same thing over and over again.

 

Any help on this issue?  My VI is attached for your reference.


Why would the Write to Measurement File correctly record the date/time when you are not passing it the date/time.? All that you are doing is passing a numeric and the Express VI has no idea that this is something your derived from the current date. Dynamic data has a specific format for storing the date and time and you would need to do that for the function to work. Since you are not interested in doing any programming, you might just have to live with the way the data is.

0 Kudos
Message 4 of 7
(3,040 Views)

aeastet could you please upload your VI in an earlier version of LV? i only have LV 8.6 and your version is in 9.

 

the express VI example 'cycle analysis' uses the write to measurement file VI and the spreadsheet files that it outputs comes out with time correctly labelled.  where in that code does it pass time to the write to measurement file VI?  the header labelling VI attached that i found on another forum also labels the measurements correctly.  i'd be game to write my own code (and i did on an earlier version of this VI) if i knew that i couldn't do it this way, it seems i'm close.

 

 

Download All
0 Kudos
Message 5 of 7
(3,015 Views)
Here is 8.6
Tim
GHSP
0 Kudos
Message 6 of 7
(3,009 Views)

aestet,

 

I don't see how that will accomplish anything. It's still a numeric that you are passing to the Write to Measurement File and there is nothing to tell that function to format it as a Date/Time string.

 

bradenrooke,

 

Instead of using dynamic data, out the merge signal function, convert it to a waveform data type and use the Build Waveform function to write the t0. As I said, you need to modify the dynamic data itself and correctly format it in order for the Write to Measurement File to output a date/time string.

 

You could also simply use something like the Write to Spreadsheet File function. If you convert everything to strings, pass an array of strings to that.

 

The Write to Measurement File is not easily editable and is really designed to work with dynamic data from start to finish. When you don't have that like in your program, you need to rethink whether it's suitable.

0 Kudos
Message 7 of 7
(3,005 Views)