Owner manual

6 Function modules
6.1 Function module for SIMATIC
®
S5
Function module FB206 serves for easy access to the controller parameter and configuration data (in P area).
6.1.1 Structure
The parameters of the function module are:
Name Type
Description / function
A-A KF
Start of output bytes for send window
E-A KF
Start of input bytes for receive window
DB-S B
Data module for parameter data
DWAS W
Data word start for order in DB
DWLR W
Number of real values
DWLI W
Number of integer values
DWLC W
d.c. always ‘0’
SERV W
Service (read/write)
CODE W
Code
FBNR W
Function block no.
FKNR W
Function no.
TYP W
d.c. (always ‘0’)
TIME KH
Timeout in time units, decremented with each FB call, must be higher than timeout in DP module.
ANZW W
The current transmission 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)
Wait for end telegram
Service (0=Read; 1=Write)
Reset order
Waits for acknowledgement
Order ready with error
O<%-2>rder ready without
error
Order running
The function module reads or writes KS800 parameter/configuration data.
w
A-A, E-A
The input addresses or output addresses of the parameter channel are
entered into these parameters. The addresses are determined during
configuration of the unit connected to the PROFIBUS (Ä Fig.:
S.23)
w
DB-S
DB-S is used for allocation of the data module pertaining to the
function module, in which all FB operations are handled. It must have
been opened previously.
Data words 0...3 of the data module are “provisional markers”, which
are enabled again after FB handling.
w
DWAS
DWAS identifies the start of the data area in the data module. The first 4 words after DWAS are
required for internal use in the function module and must not be used for other purposes.Example: 2
data sets shall be stored with high packing density in DB25.
Function modules
43 9499 040 50511
FB206
A-A
E-A
DB-S
DWAS
DWLR
DWLI
DWLC
SERV
CODE
FBNR
FKNR
TYP
TIME
ANZW
DBxx
...
...
Byte 11
E-Adr.
P000
P002
P004
P006
P007
P008
...
A-Adr.
P000
P002
P004
P006
...