
Rockwell Automation Publication 2080-UM002N-EN-E - November 2022
209
Chapter 10 Use the High-Speed Counter and Programmable Limit Switch
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)
The bit pattern of the HSCAPP.OutputMask variable directly corresponds to the output bits on
the controller. Bits that are set (1) are enabled and can be turned on or off by the HSC sub-
system. Bits that are clear (0) cannot be turned on or off by the HSC sub-system. The mask bit
pattern can be configured only during initial setup.
shows example of how HPOutput and OutputMask controls Embedded output.
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