Tachometer using Retro-Reflective sensor

I saw this used in one of the FIRST robotics books and I was wondering specifically how someone would implement this?

The tape is placed on a rotating object in segments. This allows a photo sensor aimed at the tape to alternately turn on and off at the segment rate effectively counting segments. Say there are eight transitions on a 6" diameter wheel, you might be able to resolve horizontal movement of the robot on the order of less than one inch per segment. More transitions gives you better accuracy. If you use two sensors you can actually determine direction as well as rotation distance.

Ok. I was more interested in sensing speed rather than distance. Does anyone know how to implement the code for this? Is DMA involved? Periodic tasks? Interrupts?

It should be simple using the counter vis.

There’s an example towards the bottom of the page here: http://team358.org/files/programming/ControlSystem2009-/LabVIEW/

Search fot “Tach”