Siemens Simatic S5 IP 240 Manual page 136

Counter/positioning/position decoder module
Hide thumbs Also See for Simatic S5 IP 240:
Table of Contents

Advertisement

IP 240
8.3.2
Control Function Block
FB 172 (STEU.DOS) Control function block for counting.
Functional description
The control function block first verifies whether the addressed channel has been configured for
counting mode. Depending on the parameters assigned to the function block, certain data areas
are transferred from the data block to the IP 240, or updated in the DB by reading them from the
IP 240.
The following functions are possible:
Reading the actual value, final value and status bits
Writing the control statements (control bits)
Reading the interrupt request bytes
Writing the initial count value
Communications and parameter assignment errors are flagged in the PAFE byte and described in
detail in data words DW 8 to 10 and DW 13. The specified function is not executed in the event of
an error.
Function block call
The control FB is usually called in the cyclic program and in the interrupt service organization
blocks.
: JU FB 172
NAME : STEU.DOS
DBNR : KF
FKT
: KF
PAFE : QB
Table 8-2. Parameters for Control FB 172
Para-
Name
meter
type
DBNR
D
FKT
D
PAFE
Q
Parameter assignments
DBNR : KF
3 - 255
FKT
: KF
1
2
3
4
PAFE : QB
EWA 4NEB 811 6120-02a
STL
Data type
Description
KF
Data block number
KF
Function number
BY
Error identifier byte
Number of the data block created
Read actual value, final value and status bits
Write control statements (control bits)
Read interrupt request bytes
Write initial count value
Flag byte or output bytes (0 to 239) in which any errors are flagged
( Section 6.4)
LAD/CSF
FB 172
DBNR
FKT
PAFE
Counting
QB
8-11

Advertisement

Table of Contents
loading

Table of Contents