Are you using the T100MD+ PLC? If so, you can wire it to input #3 or #4 and measure up to two channels of incoming pulse frequency using the PMON and PULSEFREQUENCY function. Then it is a matter of IF THEN ELSE statement to compare the current rpm with previous rpm.
E.g. PMON 1 in an init function.
M =
' the normal frequency (RPM*60)
Use a clock pulse (e.g. 1.0 second) to read the frequency of incoming pulses from input #3 (Pulse monitor channel 1):
X = PULSEFREQUENCY(1)
IF (X-M) >
THEN
SETIO xxx ' xxx is the label name of output 1.
...
ELSE
...
ENDIF
' IF the current frequency (pulse per second) is an acceptable value then
M = X ' store the normal M value.