LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Searching for discontinuity in an array of timestamps

Hi,
I have a problem with an array of timestamps.
I wish to search the array for discontinuous times. i.e. there should be a time each minute and I wish to be able to seperate the data into differant arrays according to these discontinuities.
i.e. if I have a time of 13:00 then 13:01, 16:05,16:06   I want the first two to go into one array and the second two to go into another array etc......
Please help
0 Kudos
Message 1 of 7
(3,023 Views)
The elementary mathematical functions are amazingly versatile. You can subtract two timestamps and get a numeric value, possibly the difference in seconds. Compare to a threshold to find your gaps.

Lynn
0 Kudos
Message 2 of 7
(3,014 Views)
Thanks for your prompt reply.
I am having trouble with the comparing of the two timestamps. I have changed the timing to custom time format  in the format and precision area. The trouble is that even when the hours/minutes are the same it still says that the stamps are differant (as it is also comparing seconds/milliseconds which I don't want it to do)
I then hope to take in the same array of timestamps twice with one of them initialized to one and then comparing the times to see if there is a minute between them. If there is a more efficient way of doing this please inform me as I am still learning.
Thanks in advance
0 Kudos
Message 3 of 7
(2,996 Views)
Hi wiwah,

the vi shows what Lynn tried to tell you!

Message Edited by GerdW on 03-23-2007 11:04 AM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(2,996 Views)
Thanks for your replies but I am still having trouble with comparing the timestamps...I just want to compare hours and minutes, not seconds. But even when the hrs and mins are the same it still compares the seconds and miliseconds which I don't care about and tells me that the times are not the same.
I presume that there is something I need to change in the format and presicion but I have tried and it still keeps happening.
Any ideas??

0 Kudos
Message 5 of 7
(2,977 Views)

Having not seen your vi i dont know if it suitable for your purpose, however have you thought about using the "Get Date / Time String" vi from the timing pallette and using that instead?  If the time stamps are created from a measurement then you should be able to do as Lyn and Gerd have suggested above.  If not try this vi i have attached which simple takes the mins and hours out of the time stamp.

Craig

Message Edited by craigc on 03-23-2007 11:47 AM

LabVIEW 2012
0 Kudos
Message 6 of 7
(2,972 Views)
Thanks Guys I think I've got it sorted!!!!
0 Kudos
Message 7 of 7
(2,956 Views)