Technical data
Example 1 continued:
b) Program structure:
FB 10 is made up of five program sections with the following tasks:
- Input parameters
a) Check that the source and destination data block are not the same
type and same number.
b) Check that the input parameters "source offset", "destination offset"
and "length of field" are less than 4096.
- Source data block:
a) Check that the source data block exists and is long
enough.
b) Calculate the absolute address of the last data word in the
destination field.
- Destination data block:
a) Check that the destination data block exists and is long enough and
whether it is in the random access memory (RAM submodule or DB-RAM).
b) Calculate the absolute address of the last data word in the
destination field.
- Transfer:
Execute the copy function with the help of the TNW operation.
Blocks of data with more than 255 words are transferred in sub-fields
of 128 words (operation TNW 128).
Any remaining data is transferred by an additional TNW operation.
- Condition code:
Write the output parameter "status" according to the results of the
checks carried out.
c) Occupied memory cells
FW 242 End address of the data destination
FW 244 End address of the data source
FW 246 Length of the field of data
FW 248 Offset in the destination data block
FW 250 Type and number of the destination data block
FW 252 Offset in the source data block
FW 254 Type and number of the source data block
RS 60 Sub-field counter
Continued on next page
Transferring Fields of Memory
CPU 928B Programming Guide
9 - 22 C79000-B8576-C898-01