03-01-2022 09:20 AM
Hi,
I am using labVIEW to measure the periodic time of a pendulum using a photogate. I would like to know how I would start a timer when the photogate is activated the first time, then stop the timer when the photogate is activated the third time. Any advice would be much appreciated,
Kind Regards,
Patrick
03-01-2022 09:47 AM
How is the Photogate interfaced with the computer?
03-01-2022 10:16 AM
03-01-2022 10:59 AM
I would recommend using a counter task, specifically a finite buffered period measurement with at least 3 samples. From your array of periods, you'll want to ignore index 0, then sum indices 1+2 for your oscillation period.
Index 0 will be the arbitrary time from when you start the task until the first active photogate edge is seen. In many apps, it's meaningless and should be ignored.
(Note: The initial meaningless interval is measured on older device designs like your M-series board. A newer X-series device would suppress this initial interval so then you'd simply sum indices 0+1. This change was made as a non-negotiable "favor" so the behavior is present *all* of the time, but it turns out it's only actually helpful *most* of the time.)
-Kevin P