11-25-2005 10:58 AM
11-25-2005 04:54 PM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
11-28-2005 08:33 AM
11-28-2005 08:59 AM
Your overall start time is the LATEST of the three start times.
Calculate a PAD factor for each signal - the number of samples you would have to add at the beginning to align it. In your example, the A pad factor would be 0, the B pad factor would be 3, the C pad factor would be 2.
Find the LONGEST of those pad factors ( 3 ), and call it your ALIGN point.
Then your end time is going to be the SHORTEST of { A #samples + A Pad, B #samples + B Pad, C #samples + C Pad}.
In your example, that's the SHORTEST of {15+0, 19+3, 9+2 } or END TIME = 11.
Your START sample number for A is (Align point - A pad) 3 - 0 = 3
Your START sample number for B is (Align point - B pad) 3 - 3 = 0
Your START sample number for C is (Align point - C pad) 3 - 2 = 1
Your duration for all of them is (End Time - Start Point) 11 - 3 = 8
If the duration comes out to zero or less, there is no intersection.
Blog for (mostly LabVIEW) programmers: Tips And Tricks