Publication 1763-RM001C-EN-P - October 2009
114
Using the High-Speed Counter and Programmable Limit Switch
•
Load new HSC parameters using the HSL instruction. See HSL -
High-Speed Counter Load on page 118.
The data loaded into the low preset must greater than or equal to the data
resident in the underflow (HSC:0.UNF) parameter, or an HSC error is
generated. (If the underflow and low preset values are negative numbers,
the low preset must be a number with a smaller absolute value.)
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
Description
Address
Data Format
Type
User Program Access
OVF - Overflow
HSC:0.OVF
long word (32-bit INT) control
read/write
TIP
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
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive