LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set time value when exporting from LabView to Excel

Hi, My goal is very simple. I have to measure temeprature from 4 thermocouples for an hour and export the data to an excel sheet for further analyzing. I have set up everything however on the excel sheet it only shows the time value as the actual time when the data was ran (ie. 3/14/2019 7:34:02). Instead i need to it to be in Seconds or minutes (ie, 0s - 3600s). I have attached my setup below.

0 Kudos
Message 1 of 8
(3,411 Views)

A picture of two express VI's in a loop doesn't show us anything about how those Express VI's are setup.

 

Why didn't you attach your actual VI?

 

If you are doing this in Excel, you could subtract the initial time from all the following times and format it to show minutes:seconds.

 

There is probably an easy way to do that in the Express VI but we can't see how you have it setup now.

0 Kudos
Message 2 of 8
(3,366 Views)

Do you mean attaching the file of the VI?

0 Kudos
Message 3 of 8
(3,342 Views)

Well you have a couple options...

 

First lose the Express VI's and use LabVIEW to format your own timestamp exactly as you want and write it to your file along with your data.

 

Second have you tried reformatting the time column once you have it in Excel? 

 

EDIT: I just reread your post. Do you by chance want your timestamp to be "elapsed time" instead of an absolute Timestamp?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 8
(3,334 Views)

Yes, that's exactly what i want, elapsed time.

0 Kudos
Message 5 of 8
(3,327 Views)

Well then there are a couple ways to go about this

 

First off and maybe the easiest way (at least for any data you already have) is to just do the math on the timestamps to get the interval and running total in Excel. (Yes you can do math on time in Excel and LabVIEW)

 

Subtract the more recent timestamp from the one before it to get the interval and sum that with the last interval get elapsed time.

 

Now in your program just do the same thing and write the "elapsed seconds" to your data file at the same time you write you data. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 8
(3,319 Views)

I don't have any data as of yet as I would like to have everything setup before running my experiment. So are their other options?

0 Kudos
Message 7 of 8
(3,311 Views)

@acarc wrote:

I don't have any data as of yet as I would like to have everything setup before running my experiment. So are their other options?


I'm really happy you don't work for NASA.  "I've never tested any part of this Space Shuttle Rocket yet, but want to have everything setup before sending it aloft with a crew of astronauts.  So are there other options?"

 

Generate some test data.  You can use a Signal Generator (check out the Waveforms Palette) or a For Loop with a Random Number generator inside it.  Waveforms carry a TimeStamp with them, and the "data-generating" For Loop can include a TimeStamp on entry or exit.  If your data acquisition is continuous and controlled by a good DAQ device, you really only need one TimeStamp (and maybe not even that), as your DAQ device should be providing data at very precisely-timed intervals, so all you need to do is "count the samples" to get the time.

 

Bob Schor

0 Kudos
Message 8 of 8
(3,295 Views)