Rockwell Automation Publication 2080-UM002G-EN-E - March 2015 143
Use the High-Speed Counter and Programmable Limit Switch Chapter 8
HSC (High Speed Counter)
Function Block
The HSC function block can be used to start/stop HSC counting, to refresh
HSC status, to reload HSC setting, and to reset HSC accumulator.
HSC Commands (HScCmd)
HscCmd is an input parameter with data type USINT. All HSC commands
(1…4) are Level commands. Users are advised to disable the instruction before
updating the command.
HscCmd = 1 starts the HSC mechanism. Once the HSC is in running mode, the
HscCmd = 2 must be issued to stop counting. Setting the Enable input
parameter to False does not stop counting while in running mode.
HscCmd = 3 reloads the following parameter values: HighPreset, LowPreset,
OverFlow, UnderFlow, HighPreset Output, and LowPreset Output.
The parameter values shown in the Variable Monitor may not match the values in
the Hardware. Command 3 must be executed to load the values from the
variables to the hardware without stopping the HSC.
If the HSC Enable is True, HscCmd = 3 will continuously load the parameters.
Trigger HscCmd = 3 only once.
HSC
HscCmd
STS
HscAppData
HscStsInfo
PlsData
Enable
HSC Parameters
Parameter Parameter
Typ e
Data Type Parameter Description
Enable Input BOOL Enable function block.
When Enable = TRUE, perform the HSC operation specified in “HSC command”
parameter.
When Enable = FALSE, there is no HSC operation, and no HSC status update.
HscCmd Input USINT Refer to HSC Commands on page 144
HscAppData Input See HSC APP Data Structure on
page 125
HSC application configuration. Only initial configuration is needed usually.
PlsData Input See array of Programmable Limit
Switch (PLS) Function on page
145
Programmable Limit Switch (PLS) Data
HscStsInfo Output See HSC STS (HSC Status) Data
Structure on page 136
HSC dynamic status. Status info is usualy continuously updated during HSC
counting.
Sts Output UINT HSC function block execution status