
Rockwell Automation Publication 2080-UM002N-EN-E - November 2022
217
Chapter 10 Use the High-Speed Counter and Programmable Limit Switch
HSC_SET_STS Function
Block
The HSC Set Status function block can be used to change the HSC counting status. This
function block is called when the HSC is not counting (stopped).
Table 55 - HSC Commands
HSC Command
Description
0x00
Reserved
0x01
HSC RUN
• Start HSC (if HSC in Idle mode and Rung is Enabled)
• Update HSC Status Info only (if HSC already in RUN mode and Rung is Enabled)
• Update HSC status Info only (if Rung is disabled)
0x02
HSC Stop: Stop an HSC counting (if HSC is in RUN mode and Rung is Enabled.)
0x03
HSC Load: reload HSC Configuration (if Rung is Enabled) for 6 input elements: HPSetting,
LPSetting, HPOutput, LPOutput, OFSetting, and UFSetting. HSC accumulator is NOT
reloaded by cmd = 0x03.
0x04
HSC Reset: set Accumulator to assigned value, and reset HSC status information (if Rung
is Enabled)
Table 56 - HSC Function Block Status Codes
HSC Status Code
Description
0x00
No action from Controller because the function block is not enabled
0x01
HSC function block successfully executed
0x02
HSC command invalid
0x03
HSC ID out of range
0x04
HSC Configuration Error
Table 57 - HSC Parameters
Parameter
Parameter
Type
Data Type
Parameter Description
Enable
Input
BOOL
Enable function block.
When Enable = TRUE, set/reset the HSC status.
When Enable = FALSE, there is no HSC status change.
HscId
Input
Describes which HSC status to set.
Mode1Done
Input
BOOL
Mode 1A or 1B counting is done.
HPReached
Input
BOOL
High Preset reached.
This bit can be reset to FALSE when HSC is not counting.
LPReached
Input
BOOL
Low Preset reached.
This bit can be reset to FALSE when HSC is not counting.
OFOccurred
Input
BOOL
Overflow occurred.
This bit can be reset to FALSE when necessary.
UFOccurred
Input
BOOL
Underflow occurred.
This bit can be reset to FALSE when necessary.
Sts
Output
UINT
HSC function block execution status
Refer to HSC Function Block Status Codes on page 217
for HSC status code description (except 0x02 and 0x04).
HSC
HSC
HscId
STS
Mode1Done
HPReached
LPReached
OFOccured
UFOccured
Enable