Specifications

IP 240 Counting
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 Data type Description
type
DBNR D KF Data block number
FKT D KF Function number
PAFE Q BY Error identifier byte
STL LAD/CSF
FB 172
QB
DBNR
FKT PAFE
Parameter assignments
DBNR: KF 3 - 255 Number of the data block created
FKT : KF 1 Read actual value, final value and status bits
2 Write control statements (control bits)
3 Read interrupt request bytes
4 Write initial count value
PAFE : QB Flag byte or output bytes (0 to 239) in which any errors are flagged
( Section 6.4)
EWA 4NEB 811 6120-02a
8-11