02-23-2006 05:43 AM - edited 02-23-2006 05:43 AM
Message Edited by YangLi on 02-23-2006 05:43 AM
Message Edited by YangLi on 02-23-2006 05:48 AM
02-23-2006 08:42 AM
02-24-2006 06:09 AM
Thanks Dennis.
I found an express VI called "Timing and Transition Measurements" which would be helpful.
The accelerometer will be used as a tilt sensor, and a 1msec resolution should be OK.
02-27-2006 10:56 AM
This will still be a very difficult task without dedicated hardware, and the 1ms resolution will still be relative to other things outside your control. Timed Loops give the tasks they execute a high priority in terms of processor time, but Windows will always be able to preempt LabVIEW in favor of anything it pleases (anti-virus software, automatic updates, screen redraws, etc.). The Timed Loop gives you the ability to dynamically handle what you do in such a situation (discard loop iterations, abort, etc.), but this is not ideal.
You would really be much better off, as Dennis said, with dedicated hardware. Most NI MIO or DIO boards come with a couple counters, which can measure high times and low times against a high-accuracy clock and calculate the duty cycle. The advantage here is that the hardware is doing all the work with real-time accuracy, so you don't have to worry about software-timing and Windows instability. In addition, the API for this in LabVIEW is much simpler.
If you choose to try using timed loops, then you will have pair each digital acquistion with a timestamp and for a sort of digital waveform.