LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to add the time elapsed to my measurements?

I would like to add the time elapsed to my measurements, so that the first sample I acquire would have a time of zero and then for the second sample the time elapsed should be calculated and so on. So far I could only add the time stamp which includes Hours,minutes,seconds and milliseconds but it's not convenient to be represented in a graph, that's why I would love to get the time elapsed in seconds or milliseconds and that should be my x-axis.

0 Kudos
Message 1 of 6
(924 Views)

Elapsed time =  Current timestamp - timestamp taken at first sample

0 Kudos
Message 2 of 6
(906 Views)

That sounds simple, I was confused by all the posts I have seen about that topic and didn't think about the simple way of doing it. 
I just need to think of a way of subtracting the intial time stamp of the rest of the other timestamps. I will think of a way and then come to that thread if I didn't reach a convenient solution.

0 Kudos
Message 3 of 6
(895 Views)

Uhhh,  the subtract function   ????

0 Kudos
Message 4 of 6
(891 Views)

Well there's a couple ways to include elapsed time, after all it's just another timestamp...

  1. If you are putting a timestamp on every data acquisition
    1. Calculate the difference between timestamps and accumulate it 
    2. If you are acquiring data at regular intervals this is relatively simple
  2. Use the Elapsed Time express VI 
    1. Start the VI when you start acquiring data
    2. Use the current Elapsed Time as your timestamp on each data acquisition

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 6
(887 Views)

Use the get date time in seconds vi, then you can wire "To dbl" function, and do the subtraction, the result will be in seconds...

0 Kudos
Message 6 of 6
(844 Views)