Application of FB 110
Application of FB 110 on the S5-155U
Task
You want CPU 1 to transfer data blocks DB 3 ( data fields 2 to 5) and DB 4
(data fields 1 to 3) to CPU 2 during the cyclic user program. The RECEIVE
function (OB 204) is also called in the cyclic user program.
Implementation
Function CPU 1 CPU 2
called in: called in:
Initialization (OB 200)
Send organization (FB 1)
Receive organization (FB 2)
OB 20
OB 1
–
–
–
OB 1
exists: exists:
Send DB
Receive DB
DB 3; DB 4
–
–
DB 3; DB 4
The user program in function block FB 1 of CPU 1 contains two calls for the
function block TRANDAT in each case with different sets of parameters.
The transfer of the first data block DB 3 begins after a positive edge
after input I 2.0. A positive edge at input I 2.1 starts the transfer of
the second data block.
FB 1 LEN=yy
SEGMENT 1 0000
NAME:S-ORG
0000 :L KB 2 To CPU 2 ..
0001 :T FY 0
0002 :L KY 1,3 .. from data block DB 3
0003 :T FW 1
0004 :L KB 4 .. four data fields
0005 :T FY 3
0006 :L KB 2 .. send from 2nd data field
0007 :T FY 4
0008 :
Continued on the next page
Applications
CPU 948 Programming Guide
10 - 64 C79000-G8576-C848-04