If you need only ENABLE use count to count pulses.
Try something like this:

Code:
COUNT Pin, Period, Var
If Var<xxx then
    enable=1
else 
    enable=0
endif