5756B
41
Write Function FC 22 MEM_WRIT
Call Description:
Function FC 22 MEM_WRIT copies consistent data blocks
(data records) from the selected address area of the PLC and
writes them to the controller board buffer.
Program Sequence of FC 22:
Parameter Descriptions:
For further information on the driver blocks and
examples, please refer to the
IBS S7 300 DSC SWD UM E Driver Manual
(Order No. 27 43 25 5).
AN
M11.0
S
M11.0
CALL
FC22
// Call write function
IBDB
:= DB20
// INTERBUS data block
MODE
:= 1
// Function operating mode
SOURCE_AREA
:= 0
// Not used
SOURCE_AREA_NR := 0
// Not used
SOURCE_OFFSET
:= 0
// Not used
SOURCE_LENGTH
:= 0
// Not used
DESTINATION
:= 0
// Not used
RET
:= M11.1 // Result bit
BUSY
:= M11.0 // Activate FC 22
Parameter
Value Meaning
IBDB
DB 20 Global INTERBUS data block
MODE
1
Write data record 1 (set in
IBS CMD)
DESTINATION
0
Not used
SOURCE_AREA
0
Not used
SOURCE_AREA_NR 0
Not used
SOURCE_OFFSET
0
Not used
SOURCE_LENGTH
0
Not used
RET
M11.1 = 0: The function was
executed without errors.
= 1: An error occurred.
BUSY
M11.0 Activate FC 22