Technology instructions
10.1 Counting (High-speed counters)
S7-1200 Programmable controller
556 System Manual, V4.2, 09/2016, A5E02486680-AK
CTRL_HSC_EXT (Control high-speed counter) instruction
10.1.1.1
Table 10- 1 CTRL_HSC_EXT instruction
hsc:=_hw_hsc_in_,
done:=_done_out_,
busy:=_busy_ out_,
error:=_error_out_,
status:=_status_out_,
ctrl:=_variant_in_);
Each CTRL_HSC_EXT (Control high-
speed counter (extended)) instruction
uses a system-defined data structure
stored in a user-defined Global DB to
store counter data. You assign the
HSC_Count, HSC_Period, or
HSC_Frequency data types as an input
parameter to the CTRL_HSC_EXT in-
STEP 7 automatically creates the DB when you insert the instruction.
2
In the SCL example, "CTRL_HSC_1_DB" is the name of the instance DB.
Table 10- 2 Data types for the parameters
CTRL IN_OUT Variant SFB input and return data.
Note: Refer to "CTRL_HSC_EXT instruction System Data
Types (SDT) (Page 561)" for further information.
DONE OUT Bool 1= Indicates SFB is finished. Always 1 because SFB is syn-
Always 0, function is never busy
STATUS OUT Word Execution condition code
Note: Refer to the "Execution condition codes" table below for
Table 10- 3 Execution condition codes
HSC identifier does not address an HSC
Illegal value in NewDirection
Illegal value in NewPeriod
80B5 Illegal value in NewOpModeBehavior
Illegal value in NewLimitBehavior