Communication via Function Blocks
6.4 Programming the Function Blocks
Point-to-point connection CP 440 Installation and Parameter Assignment
106
Manual, 09/2007, A5E00057742-03
Example of a "Symbolically Addressed Actual Operand"
Calling FB 10 with symbolically addressed actual operands:
STL
Network 1:
CALL
FB 10, DB10
REQ
:= SEND_REQ
//Activates SEND
R
:= SEND_R
//Activates RESET
LADDR
:= BGADR
//Basic address
DB_NO
:= CP_DB.SEND_DBNR
//Send DB no.
DBB_NO
:= CP_DB.SEND_DWNR
//Message frame as of data word
LEN
:= CP_DB.SEND_LAE
//Message frame length
DONE
:= SEND_DONE
//Terminated without error
ERROR
:= SEND_ERROR
//Terminated with error
STATUS
:= SEND_STATUS
//Status word
EN/ENO Mechanism
The parameters EN and ENO are only present in the graphical representation (LAD or FBD).
The block is started with EN = TRUE. If the function is completed without errors, ENO =
TRUE is set. To process these parameters, the compiler uses the binary result (BR).
The binary result is set to the signal state "1" if the block was terminated without errors. If
there was an error, the BR is set to "0".
长沙工控帮教育科技有限公司
www.gkbpx.com