Data transfer to the PLC
7.2 Control program example
3WL/3VL circuit breakers with communication capability - PROFIBUS
System Manual, 03/2011, A5E01051353-02
159
7.2.5
Write data sets
General
Data sets are used for transferring larger data volumes outside the process image and they
are executed using the standard function SFC58, "WR_REC".
Step 1 Call block
To call the block, type in the line "Call SFC58" with return in program code.
Note
If block SFC58 is not yet included in the block folder, it is automatically copied from the
standard library of STEP7.
Network 7
Intermediate result after entering "Call SFC58"
CALL "WR_REC"
REQ :=
IOID :=
LADDR :=
RECNUM :=
RECORD :=
RET_VAL:=
BUSY :=
Step 2 Assignment with parameters (example: data set 68 'Data of the CubicleBUS Modules')
All parameters must be set customer-specifically.
Note
Help via "F1" when the cursor is in the line "CALL WR_REC"
Network 7
Write data set 68 "Data of the CubicleBUS Modules"
e.g. for setting the time-of-day!
CALL "WR_REC"
REQ :=M 80.0 //Triggered by program sequence
IOID :=B#16#54 //ID area inputs
LADDR :=W#16#100 //Hardware configuration "I address" in HEX
RECNUM :=B#16#44 //Data set number "68" in HEX
RECORD :=P#DB20.DBX10.0 BYTE 45
RET_VAL:=MW 82 //Acknowledgment SFC58
BUSY :=M 81.0 //Acknowledgment write still active