Technical data

10.9.2
Transferring Data Blocks
In this example, the function block TRAN DAT (FB 110) transfers a
selectable number of data fields from a data block in one CPU to the
data block of the same type and same number in a different CPU.
The FB number (FB 110) has been selected at random and you can
use other numbers.
Programming FB 110 is described first followed by the application of
FB 110.
Programming FB 110
FB 205 continued:
FB 205 LEN=30
SEGMENT 1 0000
NAME:RECV-TST
DECL :TCPU I/Q/D/B/T/C: I BI/BY/W/D:BY
DECL :ERRO I/Q/D/B/T/C: Q BI/BY/W/D:BY
DECL :RCAP I/Q/D/B/T/C: Q BI/BY/W/D:BY
000E :L =TCPU Transmitting CPU
000F :T FY 246
0010 :
0011 :L KB 246 SF OB:
0012 :JU OB 205 "Test receiving capacity"
0013 :
0014 :L FY 248 Error
0015 :T =ERRO
0016 :L FY 249 Receiving capacity
0017 :T =RCAP
0018 :BE
FB 110: Transferring a data block
Task
The data area to be transferred is stipulated by the input parameter
FIRB (= number of the first data field to be transferred) and NUMB (=
number of data fields to be transferred). A data field normally consists
of 32 data words. Depending on the data block length, the last data
field may be less than 32 data words.
The transfer is triggered by a positive-going edge at the start input
STAR. If the output parameter REST is zero after the transfer, this means
that the function block TRANDAT was able to send all the data fields
(according to the NUMB parameter).
Continued on the next page
Applications
CPU 928B Programming Guide
10 - 58 C79000-B8576-C898-01