Technology Instructions; High-Speed Counter - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Technology instructions

9.1

High-speed counter

Table 9- 1
CTRL_HSC instruction
LAD / FBD
STEP 7 automatically creates the DB when you insert the instruction.
1
In the SCL example, "CTRL_HSC_1_DB" is the name of the instance DB.
2
Table 9- 2
Data types for the parameters
Parameter and type
HSC
DIR
1, 2
CV
1
RV
1
PERIOD
1
NEW_DIR
NEW_CV
NEW_RV
NEW_PERIOD
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
SCL
"CTRL_HSC_1_DB" (
hsc:=_hw_hsc_in_,
dir:=_bool_in_,
cv:=_bool_in_,
rv:=_bool_in_,
period:=_bool_in_,
new_dir:=_int_in_,
new_cv:=_int_in_,
new_rv:=_dint_in_,
new_period:=_int_in_,
busy:=_bool_out_,
status:=_word_out_);
Data type
IN
HW_HSC
IN
Bool
IN
Bool
IN
Bool
IN
Bool
IN
Int
IN
DInt
IN
DInt
IN
Int
Description
Each CTRL_HSC (Control high-speed
counter) instruction uses a structure
stored in a DB to maintain counter data.
You assign the DB when the CTRL_HSC
instruction is placed in the editor.
Description
HSC identifier
1 = Request new direction
1 = Request to set new counter value
1= Request to set new reference value
1 = Request to set new period value
(only for frequency measurement mode)
New direction: 1= forward, -1= backward
New counter value
New reference value
New period value in seconds(only for frequency
measurement mode):
1= 1 s
2 = .1 s
3 = 0.1 s
9
409
Table of Contents
loading

Table of Contents