Rockwell Automation Publication 2080-UM002M-EN-E - April 2022 203
Chapter 9 Use the High-Speed Counter and Programmable Limit Switch
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.
HscCmd = 4 (reset) sets the Acc value to the HSC AppData.Accumalator value.
The HscCmd =4 does not stop HSC counting. If HSC is counting when the
HscCmd =4 is issued, some counting may be lost.
To reset the Acc value and then continue the counting, trigger the HscCmd =4
only once. If the command is enabled continuously, it may cause errors.
HSC AppData.Accumalator value is updated automatically by the HSC
mechanism with the same value as the HSC Sts.Accumulator. To set one
specific value to HSC Acc while counting, write the value to HSC
AppData.Accumalator immediately before HscCmd =4 is issued.
PlsData Input
See array of Programmable Limit
Switch (PLS) Function on page 205
Programmable Limit Switch (PLS) Data
HscStsInfo Output
See HSC STS (HSC Status) Data
Structure on page 196
HSC dynamic status. Status info is usualy continuously updated during HSC counting.
Sts Output UINT HSC function block execution status
Table 41 - HSC Parameters (Continued)
Parameter Parameter Type Data Type Parameter Description
Table 42 - 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)