Technology instructions
10.1 Counting (High-speed counters)
S7-1200 Programmable controller
562 System Manual, V4.2, 09/2016, A5E02486680-AK
Table 10- 4 HSC_Count structure
Returns the HSC’s current count value
CapturedCount OUT Dint Returns the counter value captured on the specified input
event
Status bit: Sync input was activated
DirChange OUT Bool Status bit: Counting direction has changed
Status bit: CurrentCount equals Reference1 event occured
Status bit: CurrentCount equals Reference2 event occured
Status bit: CurrentCount reached the LowerLimit
Status bit: CurrentCount reached the UpperLimit
EnHSC IN Bool Enables the HSC to count pulses when true; disables counting
EnCapture IN Bool Enables the Capture input when true, Capture input has no
EnSync IN Bool Enables the Sync input when true; Sync input has no effect
Enables the NewDirection value to take effect
Enables the NewCurrentCount value to take effect
Enables the NewStartValue value to take effect
Enables the NewReference1 value to take effect
Enables the NewReference2 value to take effect
Enables the NewUpperLimit value to take effect
Enables the New_Lower_Limit value to take effect
EnOpMode IN Bool Enables the NewOpModeBehavior value to take effect
Enables the NewLimitBehavior value to take effect
EnSyncBehavior IN Bool This value is not used.
NewDirection IN Int Counting direction: 1 = count up; -1 = count down; all other
NewOpModeBe-
havior
IN Int HSC’s operation on overflow: 1 = HSC stops counting (HSC
must be disabled and re-enabled to continue counting); 2 =
HSC continues to operate; all other values are reserved.
NewLimitBehav-
ior
IN Int Result of the CurrentCount value on overflow: 1 = set Cur-
rentCount to opposite limit; 2 = set CurrentCount to StartValue;
all other values are reserved.
NewSyncBehav-
IN Int This value is not used.
StartValue: Initial value of the HSC
Upper counting limit value
Lower counting limit value