Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Find timestamp array delta

Solved!
Go to solution

Hi,  I need to determine a change in timestamps programmatically.  See attached.  Time elapsed between array elements is roughly 8 seconds.  How could I find this delta?

0 Kudos
Message 1 of 4
(6,038 Views)

I have included a code snippet in this - an updated attachment.

0 Kudos
Message 2 of 4
(6,024 Views)

Hi,

 

An easy approach to getting the difference in time between time stamps in genreal would be to use the Get Date/Time in Seconds function as well as some of ther other functions in the timing pallete. You would need to use the function twice and subtract the value of one from another.  This calculates the elapsed time.

 

I think you could apply this same concept to your code by creating another loop (or maybe even the same one) with a shift register that stores the previous time stamp.  Subtract the timestamps and it should produce the elapsed time.

 

I dont't know if this helps or not.

Cameron T
Applications Engineer
National Instruments
0 Kudos
Message 3 of 4
(6,002 Views)
Solution
Accepted by topic author Newton2this1

Cameron,

 

Thank you for the reply.  I actually figured it out using 'Delete from array' twice from within a For Loop.  See the updated snippet.  The relative time was determined for a 3D plotting application.  I figured 15 minutes elapsed in 1904 (LabVIEW default) is the same as 15 minutes elapsed today and I found a difference between timestamp1 and timestamp2!  🙂 John

0 Kudos
Message 4 of 4
(5,997 Views)