132
Rockwell Automation Publication 2080-UM002L-EN-E - November 2021
Chapter 8 Use the High-Speed Counter and Programmable Limit Switch
If the underflow and low preset values are negative numbers, the low preset
must be a number with a smaller absolute value.
The HSCAPP.OFSetting 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.
The HSCAPP.UFSetting 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.
The HSCAPP.OutputMask defines which embedded
outputs on the controller
can be directly controlled by the high-speed counter. The HSC sub-system has
the ability to directly (without control program interaction) turn outputs ON
or OFF based on the HSC accumulator reaching the High or Low presets. The
bit pattern stored in the HSCAPP.OutputMask variable defines which outputs
are controlled by the HSC and which outputs are not controlled by the HSC.
For example, if the user wants to control outputs 0, 1, 3, using HSC then the
user needs to assign,
HscAppData.OutputMask = 2#1011
(OR using Decimal Value: HscAppData.OutputMask = 11)
Overflow Setting (HSCAPP.OFSetting)
Description
Data Format
Type
User Program Access
HSCAPP.OFSetting
long word (32-bit INT)
control
read/write
Data loaded into the overflow variable must be greater than the data
resident in the high preset (HSCAPP.HPSetting) or an HSC error is
generated.
Underflow Setting (HSCAPP.UFSetting)
Description
Data Format
User Program Access
HSCAPP.UFSetting
long word (32-bit INT)
read/write
Data loaded into the underflow variable must be less than or equal to the
data resident in the low preset (HSCAPP.LPSetting) or an HSC error is
generated.
Output Mask Bits (HSCAPP.OutputMask)
Description
Data Format
User Program Access
HSCAPP.OutputMask
word (32 bit binary)
read/write