EasyManua.ls Logo

Siemens Simatic S7-400

Siemens Simatic S7-400
140 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Example 1
The symbol name for the data block is entered in the symbol table, while the symbol name for
the data operand is declared in the corresponding data block.
STL
DB 20.DBW 0 Absolute fully qualified addressing
CP_DB.SEND_DWNORCV Symbolic fully qualified addressing
Example 2
The symbol name of the data block used, DB 20, is "CP_DB"; the symbol name for the send DB
number is "SEND_DBNO" and is located in data block DB 20 in the data word DBW 0.
The start address of the send frame is "SEND_DWNO" and is located in the data block DB 20 in
DBW 2. The frame length is "SEND_LEN" and is located in the data block DB 20 in DBW 4.
The variable used for the module address is the memory word "BGADR" (MW21), for the DONE
parameter the 󹪞ag "SEND_DONE" (M26.0), for the ERROR parameter the memory bit
"SEND_ERROR" (M26.1), and for the STATUS parameter the memory word "SEND_STATUS"
(MW27).
The STL listings for the example are shown on the following page.
Example of an Absolutely Addressed Actual Operand
Calling FB 10 with absolutely addressed actual operands:
STL
Network 1:
CALL
FB 10, DB10
REQ := M 0.6 //Activates SEND
R := M 5.0 //Activates RESET
LADDR := MW21 //Basic address in MW21
DB_NO := DB20.DBW0 //DB no. in DBW0 of DB20
DBB_NO := DB20.DBW2 //From DBB no., located in DBW2 of
DB20
LEN := DB20.DBW4 //Length located in DBW4 of DB20
DONE := M 26.0 //Terminated without error
ERROR := M 26.1 //Terminated with error
STATUS := MW 27 //Status word
Example of a "Symbolically Addressed Actual Operand"
Calling FB 10 with symbolically addressed actual operands:
STL
Network 1:
CALL
Communication via Function Blocks
6.4 Programming the Function Blocks
Point-to-point connection CP 440 Installation and Parameter Assignment
Equipment Manual, 03/2022, A5E00057742-AE 87

Table of Contents

Other manuals for Siemens Simatic S7-400

Related product manuals