I have a mechanical oscillating system, similar to pendulum motion, and I have connected a physical switch to LabVIEW, just to provide a simple change in voltage when the switch is pressed or activated. I would like LabVIEW to record the elapsed time every time the switch is pressed (array form is preferred) for automated frequency/period measurement. What would be the best way to go about this?
Right now I have a program with an Elapsed Time VI that resets and records a time in an array when the switch is pressed, but obviously the program continuously records values of ~0 seconds for the length of time the switch is pressed at the speed of the program's iterations.