Siemens SIMATIC S5-90U System Manual page 298

Table of Contents

Advertisement

Onboard Counter Inputs
Scanning the Actual Counter Status
The counter status can be scanned and reset to "0". The same STEP 5 operations as for individual
counters can be used (see Section 11.3).
In the following, you will find a program example for the input of a new comparison value for the
counter cascade.
Example: When the comparison value is reached, the new comparison value 1,280,520 for the
counter cascade is specified.
Set the parameters for the counter cascade in DB1 (see Table 11-8).
Calculate the hexadecimal value of 1, 280, 520.
IW 38
bin.:
0
0
0 0
0 0 0 1 0 0 1 1 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0
0
hex.:
Load the following program into the PLC.
STL
OB3
A
I
35.0
R
I
35.0
A
I
35.1
R
I
35.1
JC
FB 11
BE
STL
FB11
L
KH
0013
L
KH
8A08
T
PW
36*
BE
*
If the S5-95U counter is cascaded, the operation "T PW 36" transfers ACCU 1 and ACCU 2.
11-8
Counter Register - Counter Cascade
16
1
3
The counter cascade counted until it reached a
comparison value. An interrupt was triggered.
Bits 35.0 and 35.1 in the diagnostic byte are
reset.
The program branches to FB11.
User program responds to "Comparison value
reached".
The new comparison value is loaded into the ACCUs.
The counter cascade is set.
IW 36
8
A
Explanation
Explanation
S5-90U/S5-95U
0
0
0
8
EWA 4NEB 812 6115-02b

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s5-95u

Table of Contents