I do something like that, using the HS counter on the DL06 for the tally. I filter out short signals and trip alarm on long signals this way:
Short Filter: Count signal goes high --> CTRIO input 1, edge timer: if preset 1 is exceeded, pulse output 1 --> DL06 HS count input X0 (COULD BE COUNTER ON CTRIO?)
Long Alarm: Count signal goes high --> CTRIO input 1, edge timer: if preset 2 is exceeded, output 2 --> DL06 HS interrupt input X1