Specifications
Functional Description IP 240
6.2.1 Configuring Function Blocks
Configuring function blocks serve to select the modes. Each mode is assigned its own function
block:
• FB 167 for positioning mode ( Section 10.23.2)
• FB 169 for position decoding mode ( Section 7.3.1)
• FB 171 for counting mode ( Section 8.3.1)
• FB 173 for IP 252 expansion mode ( Section 9.3.1)
Configuring FBs are normally called in Restart organization blocks (OB20, OB21, OB22). Because
channel configuring increases the module firmware's cycle time requirement, the STEP 5 program
must be written so as to ensure that the other channel is in a safe wait state while the configuring
FB is executing.
The configuring FBs do not disable the servicing of process interrupts. This must be done by the
user program.
Before configuring, the FB checks whether it is compatible with the module firmware.
6.2.2 Control Function Blocks
Control function blocks are available for the position decoding, positioning and counting modes:
• FB 168 for positioning mode ( Section 10.23.3)
• FB 170 for position decoding mode ( Section 7.3.2)
• FB 172 for counting mode ( Section 8.3.2)
Control FB
S can be invoked without restriction in the user program when configuring has been
completed. By assigning the appropriate parameters to the blocks when they are called, various
data areas can be transferred from the data block to the IP 240, or can be written into the DB from
it.
In the control FBs, servicing of interrupts is enabled from time to time, The scratch flags and
system data areas used must therefore be saved in the interrupt service routines ( Technical
Specifications for Function Blocks).
Before executing, each control FB checks whether the channel it has addressed has been con-
figured for the relevant mode.
The control function blocks for the S5-135U and S5-155U call the subordinate function OB122. It is
therefore necessary to use the following CPUs
• CPU 922 from Version 9 onwards (operating system Version 4)
• CPU 928 from Version 2 onwards (6ES5 928-3VA12)
6.2.3 Data Blocks
The data blocks contain all data for the transfer from and to the IP 240. The number of the
relevant data block must be specified in the DBNR (Data Block NumbeR) parameter when the FB is
invoked.
The contents of the data blocks are functionally subdivided into three areas:
• Information made available by the IP 240 (general module information, status flags and
actual values),
• Specifications entered when initializing the configuring FB (module address, configuration
data),
• Control statements as well as initial and final values which are specified when the DB is
created or in the user program cycle.
The required block lengths must be observed.
6-4
EWA 4NEB 811 6120-02a