int CounterRollover[int counter]
This property defines the maximum permissible value for a counter. After the counter reaches the rollover value, the next count will cause the counter to be reset to 0 and a rollover event notification will be sent to any connections that have enabled that rollover event. For example, with a rollover threshold set to 35, the counter value will progress as follows: ..., 33, 34, 35, 0, 1, ... Because the comparisons and reset are done directly in hardware, no counts are missed during a rollover.
The valid range of the rollover threshold is from 0 to the maximum value of the counter (65535 for 16-bit counter 0, and 255 for 8-bit counter 1). The powerup default rollover threshold is 255 for 8-bit and 65535 for 16-bit counters.
This property is an integer. For counter 0 (a 16-bit counter), this may range from 0-65535. For counter 1 (an 8-bit counter), this may range from 0-255.
There is one special case involving rollover thresholds. When the counter value is manually set to exactly the threshold value by writing to the CounterValue Property, the rollover will NOT occur and the rollover event will NOT fire on the next counter increment. Instead, the counter will increment past the threshold value. The event will not fire until the counter value has wrapped around and again exceeds the threshold. For example, suppose the rollover threshold is set to 10 on an 8-bit counter and the CounterValue Property is used to set the counter value to 10. As the input line pulses, the counter value would increment as follows: 11, 12, ..., 255, 0, 1, ..., 10, 0, 1, ..., 10, 0, ...
Please note that defining a rollover threshold with this property does not enable the current connection to actually receive the rollover event notifications when they occur. These must be enabled separately using the EnableEvent Method. Also note that rollover thresholds are common to all connections. Changing the thresholds will affect other connections if they are utilizing that particular counter.