Determining the counter limits (Reset counter value / Limit counter value)

Counter limits in delivery state

In delivery state the counter value counts in the range from 0 to the maximum counter depth. When the maximum counter depth is exceeded (counter overflow) the counter starts counting up from zero again. Exceeding the counter is indicated by the "Counter overflow" bits (see chapter Determining the counter limits (Reset counter value / Limit counter value)).

When a counter underflow occurs, the count continues at the maximum counter depth even if e.g. "Enable extern reset" is enabled in index 0x80n0:02. The underflow is identified with the corresponding "Counter underflow" bit.

Determining the counter limits (Reset counter value / Limit counter value) 1:
Counter overflow and underflow in delivery state

Counter limits with defined value range

If counting is only to take place in a defined value range, the counter limits can be adjusted.

Determining the counter limits (Reset counter value / Limit counter value) 2:

Set counter limits

For writing to index 0x8001:1B "Reset counter value" and index 0x8001:1A "Limit counter value" the value 0x72657375 (ASCII: "user") must be set in 0xF008 "Code word".

Determining the counter limits (Reset counter value / Limit counter value) 3:
Counter overflow and underflow with defined value range
Determining the counter limits (Reset counter value / Limit counter value) 4:

Counter limits

  • The lower counter limit index 0x8001:1B "Reset counter value" must always be smaller than the upper counter limit 0x8001:1A "Limit counter value".
    If this is not the case, the last entered value is not accepted.
  • If the lower counter limit in index 0x8001:1B "Reset counter value" is greater than 0, the Motion Control application (NC/CNC) can only be used in a limited range.

If the counter is parameterized to a counter value outside the counter limits during runtime, this counter value is applied. Exceeding the counter limit is indicated via the process data in index 0x6002:15 "Counter value out of range".

Example:

A value is parameterized in 0x7000:11 "Set counter value" that is out of counter range and the "Set counter" bit in index 0x7000:03 is enabled.
→ The value specified in index 0x7000:11 is accepted.
→ The "Counter value out of range" bit in index 0x6002:15 is set.

If the counter limits are parameterized in such a way that the current counter value is outside these limits, the underflow/overflow of the counter limit is also shown via the process data in index 0x6002:15 "Counter value out of range".

Counter overflow and Counter underflow

An overflow or underflow of the counter limits is indicated by the process data 0x6000:04 "Counter underflow" or 0x6000:05 "Counter overflow".

Example 1:

0x8001:1A "Limit counter value" = 212-1 = 4095

0x8001:1B "Reset counter value" = 0

"Counter underflow" bit is reset when: 2/3 * 4095 = 2730 is reached.

"Counter overflow" bit is reset when: 1/3 * 4095 = 1365 is reached.

Example 2:

0x8001:1A "Limit counter value" = 212-1 = 4095

0x8001:1B "Reset counter value" = 400

"Counter underflow" bit is reset when: 2/3 * (4095-400) +400 = 2463 is reached.

"Counter overflow" bit is reset when: 1/3 * (4095-95) +400 = 1232 is reached.