Owner manual
6.2 Function module for SIMATIC
®
S7
The S7-FB handling principle corresponds to the S5 variant. When starting an order and as long as the order
is active, calling up the FB is indispensable.
Dependent of S7-CPU and DP-Master, the I/O handling is different. With a CPU315-2 DP with on-board DP
interface, SFC modules 14 and 15 must be used for consistent data transmission. SFC modules 14 and 15
copy the I/O areas into the marker or data module area. When using an external CP (CP 342-5 DP), the
relevant DP-SEND and DP-RECEIVE FBs at the cycle start and end must be called up.
The FB has an instance DB, which must also be specified with FB call.
6.2.1 Structure
The call parameters of the function module are:
Name Type
Description / function
A-start Pointer
Output word address area start (e.g. address data area ‘RECORD’ of SFC 15, Ax, y when using an
external CP). The DB no. must also be transmitted when specifying a data word (e.g. DB4.DBX0.0)
E-start Pointer
Input word address area start (e.g. address data area ‘RECORD’ of SFC 15, Ex, y when using an
external CP). The DB no. must also be transmitted when specifying a data word (e.g. DB4.DBX0.0)
DB-Para Pointer
Specification of data module with the parameter setting data. The entry comprises the data module
no. and the data word no. at which the parameter data start. Thereby,no
offset needs being taken
into account. The data are interpreted as parameter data (useful data) by the specified address. The
DB must be specified in the following form e.g. DB6.DBX10.0
Service WORD
Service (Read/Write)
Code_nr WORD
Code
FB_nr WORD
Function block no. (channel addressing)
FKT_nr WORD
Function no.
Typ WORD
No function (always ‘0’)
Timeout DWORD
Timeout value, is decremented with each call. With a value of = 1, the order is cancelled with error
message ‘timeout’.
DWLR WORD
Length of real values
DWLI WORD
Length of integer values
DWLC WORD
D.c. always ‘0’
ANZW W
The current transmision status for the selected data area is given in the display word. The structure of
the display word is:
15 14 13 12 11 10 9 8 7 6543210
Timeout (FB)
Service faulty
NAK (access by controller
not accepted)
Parity error
Timeout internal (controller)
Waiting for end telegram
Service (0=Read; 1=Write)
Reset order
Waits for acknowledgement
Order finished with error
Order finished without error
Order running
The function module reads or writes KS800 parameter/configuration data.
w
A-start, E-start
The parameter channel input addresses or output addresses are entered into these parameters. The
addresses are determined during configuration of the unit connected to the PROFIBUS (STEP 7 -
hardware configuration)
w
DB-Para
DB-Para is a pointer to the data module, into which read data are written or from which data are taken
when writing.
Function modules
9499 040 50511 46