S7-200 PLC high speed counter instructions

(1) each counter has a 32-bit high-speed current values of preset and a 32-bit value, current value, and default value for the signed integer values. To set the new high speed counter current and new preset values, you must set the control byte (table 6-7), making it the fifth and sixth bit is 1, allow update the preset value and the current value, the new current value and writes a new preset value special flag store. And then do the HSC instruction, set the new value to the high speed counter
HSC0
HSC1
HSC2
HSC3
HSC4
HSC5
SMD38
SMD48
SMD58
SMD138
SMD148
SMD158
SMD42
SMD52
SMD62
SMD142
SMD152
SMD162
Besides control bytes as well as the new preset value and the current value of bytes, but can also use data type HC (high-speed counter current value) and counter number (0, 1, 2, 3, 4, or 5) read each high speed counter‘s current value. Therefore, the read operation can be directly read the current value, but only with the HSC directives to perform write operations.
(2) before performing a HDEF instructions, high speed counter control byte bit must be set into the State, or else will use the default settings. Default settings: reset and start input active high, quadrature counting rate selection 4x mode. After performing a HDEF instruction, you can no longer change the counter sets, unless the CPU enters the stop mode.
(3) when you perform a HSC instruction, related to the CPU and check the control bytes current and preset values.

Leave a Reply

Your email address will not be published. Required fields are marked *