The two general principles to determine speed are to count a number of pulses over a period of time, or to measure the period of time between each pulse.
The way I have done this with SLC-500 controllers without using a dedicated counter module like the 1746-HSCE or -HSCE2 is to count a number of pulses over a very precise period of time, using the SLC-500's operating system feature called the Discrete Input Interrupt (DII) function.
This function allows you to select one input module, apply a mask to the inputs to determine which one triggers the function, and execute a single routine when that specific input changes state.
Even better, you can configure the DII function to only execute the interrupt routine when the input has changes state a certain number of times (the Preset value, S2:50).
There is a timer with a 10 microsecond increment that delivers the value between executions of the DII routine.
Let's say you configure the DII to execute once every 10 counts of a specific input. Let's say when the DII routine executes, the S:45 register (the 10 us timer) has an accumulated value of "10,000" meaning 10,000 x 10 microseconds = 100 milliseconds. 10 counts in 100 milliseconds means 100 counts per second, or 6000 RPM.
You'll need to have an Input module that can keep up with your signal; the ordinary 1746-IB16 modules have a response speed of around 8 milliseconds, while the 1746-ITV16 has a response speed of 0.3 milliseconds.
The key questions to determine if the DII method is feasible are:
How fast is the shaft rotating ?
How long is the Proximity switch input true ? You might need an oscilloscope to answer this accurately, though a little geometry will get you close.