What you need to do is measure the time between some pulses.
If the shaft has one pulse per rev. then the rotational speed (RPM) = (1 \ time from first pulse to second pulse) * 60
i.e.
800 RPM = a period of 0.075 seconds.
1000RPM = a period of 0.06 seconds.
0.06s = 1 Rotation
__________|=========|_________________________________________________|=========|_________
assuming leading edge being used to start and stop counting
Although from what you say, I think things are a bit more interesting.
The best way is to input the pulses to a timer counter hardware so that
the hardware will do the timing work for you. Lots of NI boards support
a timer couter that can be used in this way. The hardware is set up
using the timer counter functions to start and stop on an edge
transition, such as a rising edge transition. That is from a 0 to a 1.
If you are trying to get to angular velocity then you may have more
than one pulse per rev!!
In principal if there are more than one pulse per rev. then using the time for one tooth period yields: -
speed (RPM) = (1 \ (time from first pulse to second pulse * N)) * 60
N is the number of teeth.
Thus 1ms would be the period for 1000 RPM using a 60 tooth encoder.
You could find interesting things if you are using certian types of rotational systems.
Anyway see the links below, they will be of great additional benefit and complement what is here :-
http://zone.ni.com/devzone/conceptd.nsf/webmain/7C10D82CCB777CE086256F4F0018C3A9
http://zone.ni.com/devzone/devzoneweb.nsf/Opendoc?openagent&774F83DCE164A86D86256E6600816C93
Complete Industrial Digital I/O and Counter/Timer Tutorial
http://zone.ni.com/devzone/devzoneweb.nsf/Opendoc?openagent&71012CCCCB2E89A586256E54006E2259