Counter over-/underflow
An counter overflow or underflow is displayed via the process data 0x6000:04 "Counter underflow" or 0x6000:05 "Counter overflow".
- The "Counter underflow" bit in index 0x6000:04 is set if an underflow 0 → 0x8000:12 "Counter reload value" occurs.
It is reset if the value falls below 2/3 of the counting range. - The "Counter overflow" bit 0x6000:05 is set if an overflow 0x8000:12 "Counter reload value" → 0 occurs.
It is reset if 1/3 of the counting range is exceeded.
Example 1:
0x8000:12 "Counter reload value" = 212-1 = 4095
"Counter underflow" bit is reset when: 2/3 * 4095 = 2730 is reached.
"Counter overflow" bit is reset when: 1/3 * 4095 = 1365 is reached.