LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array

Hi,
Does anybody know I can creat an array of time with 5 elements. These time elements come from a tick count(ms). So what I am trying to say is that I have one source that is running continuously and each time that my input signal goes under 255 the time is recorded and this will happen for 5 times. I need to store these time elements and use them later in my program.
 
Thank you  
0 Kudos
Message 1 of 2
(2,544 Views)
I have one source that is running continuously

Source of what?
You never said what your source is.

If you're sampling an analog signal, I would consider an indefinite (continuous) acquisition with a buffer - sample the signal continuously, and remember the mSec count when you start.
When the buffer is half full, look through the first half for transitions across the 255 point. If you find one at sample #37, for example, figure the time as Tstart + 37 / Sample Rate.
When you expire the buffer, wait for another half-buffer of data and process that, adding NSamples/Sample Rate to your Tstart.
When you get your five transitions (or your time has gone beyond the limit), terminate the acquisition.

Your only uncertainty is the initial timer uncertainty - you don't know exactly when your acquisition starts, relative to the mSec timer. Unless you're doing sub mSec timing, that won't matter.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 2
(2,534 Views)