LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read Time Values

Hi,
 
The file i want to read in, has a few columns. The first includes the time and second one for example some force data. The force data starts and ends at some row, before starting and after ending there are zeros. So my questions is, how i can get the time data from the very beginning and from ending, for calculating how long the measurement was?!
So simply: the time data from the first force value and the same for the last one, then to subtract the smaller from the bigger one, thats the complete time:
But it has to work differnet startings and differnet endings...
 
Has anyone an idea, then please tell me...
 
Thanks, Thomas

Message Edited by trathgeber on 03-20-2007 07:23 AM

0 Kudos
Message 1 of 4
(2,787 Views)
Hi trathgeber,

simple solution could be:
1) compare your force array with '<>0' - this will result in a boolean array
2) search for the first 'true' in this array, the resulting index is your starting row
3) search for the first 'false' after the index from step 2 - this will be your end row
4) get the corresponding values for both indices from your time data array and subtract...


Message Edited by GerdW on 03-20-2007 02:47 PM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,782 Views)
Thanks for this solution, but i´m very sorry, because i forgot something to add: there are sometimes zeros also during the force data, because it is like running, where there is a flying phase and i want to know when the first and when the last impact was, to know how long he/she was running, or how much time he/she needed for lets say ten steps...
 
Sorry, Thomas
0 Kudos
Message 3 of 4
(2,777 Views)
Hi Thomas,

replace the 3rd step by searching from the end of the force data:
reverse the boolean array, search for the first true, subtract array-length by found index and you get the index of the last row.
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 4
(2,773 Views)