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 948 Programming Guide
10 - 60
C79000-G8576-C848-04
Содержание CPU 948
Страница 10: ...Contents CPU 948 Programming Guide 1 2 C79000 G8576 C848 04 ...
Страница 32: ...Contents CPU 948 Programming Guide 2 2 C79000 G8576 C848 04 ...
Страница 72: ...Data Blocks CPU 948 Programming Guide 2 42 C79000 G8576 C848 04 ...
Страница 74: ...Contents CPU 948 Programming Guide 3 2 C79000 G8576 C848 04 ...
Страница 154: ...Contents CPU 948 Programming Guide 4 2 C79000 G8576 C848 04 ...
Страница 200: ...Contents CPU 948 Programming Guide 5 2 C79000 G8576 C848 04 ...
Страница 308: ...Contents CPU 948 Programming Guide 7 2 C79000 G8576 C848 04 ...
Страница 324: ...Examples of Parameter Assignment CPU 948 Programming Guide 7 18 C79000 G8576 C848 04 ...
Страница 326: ...Contents CPU 948 Programming Guide 8 2 C79000 G8576 C848 04 ...
Страница 370: ...Addressable System Data Area CPU 948 Programming Guide 8 46 C79000 G8576 C848 04 ...
Страница 372: ...Contents CPU 948 Programming Guide 9 2 C79000 G8576 C848 04 ...
Страница 404: ...Operations with the Base Address Register BR Register CPU 948 Programming Guide 9 34 C79000 G8576 C848 04 ...
Страница 486: ...Contents CPU 948 Programming Guide 11 2 C79000 G8576 C848 04 ...
Страница 522: ...PG Functions via the S5 Bus CPU 948 Programming Guide 11 38 C79000 G8576 C848 04 ...
Страница 524: ...Contents CPU 948 Programming Guide 12 2 C79000 G8576 C848 04 ...
Страница 538: ...Contents CPU 948 Programming Guide 13 2 C79000 G8576 C848 04 ...
Страница 546: ...List of Key Words CPU 948 Programming Guide Index 6 C79000 G8576 C848 04 ...