S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
409
Table 9- 1 CTRL_HSC instruction
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_,
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.
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 9- 2 Data types for the parameters
1, 2
1 = Request new direction
1
1 = Request to set new counter value
1
1= Request to set new reference value
PERIOD
1
IN Bool 1 = Request to set new period value
(only for frequency measurement mode)
New direction: 1= forward, -1= backward
NEW_PERIOD IN Int New period value in seconds(only for frequency
measurement mode):
1= 1 s
2 = .1 s