Publication 1762-RM001C-EN-P
Using the High-Speed Counter 5-23
Overflow (OVF)
The OVF (Overflow) defines the upper count limit for the counter. If the
counter’s accumulated value increments past the value specified in this
variable, an overflow interrupt is generated. When the overflow interrupt
is generated, the HSC sub-system rolls the accumulator over to the
underflow value and the counter continues counting from the underflow
value (counts are not lost in this transition). The user can specify any
value for the overflow position, provided it is greater than the underflow
value and falls between -2,147,483,648 and 2,147,483,647.
To load data into the overflow variable, the control program must toggle
(low to high) the Set Parameters (HSC:0.0/SP) control bit. When the SP bit
is toggled high, the data currently stored in the HSC function file is
transferred/loaded into the HSC sub-system.
Underflow (UNF)
The UNF (Underflow) defines the lower count limit for the counter. If the
counter’s accumulated value decrements past the value specified in this
variable, an underflow interrupt is generated. When the underflow
interrupt is generated, the HSC sub-system resets the accumulated value
to the overflow value and the counter then begins counting from the
overflow value (counts are not lost in this transition). The user can specify
any value for the underflow position, provided it is less than the overflow
value and falls between -2,147,483,648 and 2,147,483,647.
To load data into the underflow variable, the control program must toggle
(low to high) the Set Parameters (HSC:0.0/SP) control bit. When the SP bit
is toggled high, the data currently stored in the HSC function file is
transferred/loaded into the HSC sub-system.
Description Address Data Format Type User Program Access
OVF - Overflow HSC:0.OVF long word (32-bit INT) control read/write
NOTE
Data loaded into the overflow variable must be
greater than the data resident in the high preset
(HSC:0.HIP) or an HSC error is generated.
Description Address Data Format Type User Program Access
UNF - Underflow HSC:0.UNF long word (32-bit INT) control read/write
NOTE
Data loaded into the overflow variable must be greater
than the data resident in the high preset (HSC:0.HIP) or
an HSC error is generated.