Siemens Simatic S7 Series System Manual page 234

Hide thumbs Also See for Simatic S7 Series:
Table of Contents

Advertisement

Program instructions
7.6 Counters
HSC0
HSC1
SM37.0
Not sup-
ported
SM37.2
Not sup-
ported
The default setting of the reset input is active high, and the AB quadrature phase counting rate is 4x (or four times the
1
input clock frequency).
Example: High-speed counter definition
LAD
MAIN
HSC instruction enables counters, sets counting direction, and loads preset/current count values
The HSC instruction uses the control byte during execution. After you assign the counter and
the counter mode, you can program the dynamic parameters of the counter. Each high-
speed counter has a control byte in SM memory that allows the following actions:
● Enabling or disabling the counter
● Controlling the direction (modes 0 and 1 only), or the initial counting direction for all other
modes
● Loading the current value
● Loading the preset value
234
HSC2
HSC3
SM57.0
Not sup-
ported
SM57.2
Not sup-
ported
Description (used only when HDEF is executed)
Active level control bit for Reset
0 = Reset is active high
1 = Reset is active low
Counting rate selection for AB quadrature phase counters
0 = 4X counting rate
1 = 1X counting rate
On the first scan:
1. Select the reset input to be active
high and select 4x mode.
2. Configure HSC0 for AB quadrature
phase with reset input (mode 10).
:
1
STL
Network 1
LD SM0.1
MOVB 16#F8, SMB37
HDEF 0, 10
System Manual, 09/2015, A5E03822230-AC
:
1
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart series

Table of Contents