Data transfer within the PLC
861
Part III FP Instructions
ReadDataFromFile
RegisterBank
Read Data from File Register Bank 1 or 2
With this function you cannot read data in the FL area (File Register Bank 0), i.e., the variable
applied at DataStartAddress must not be located in the FL area.
To add an enable input and enable output to the instruction, select [With EN/ENO] from the
"Instructions" pane (LD, FBD or IL editor). To reuse an instruction select "Recently used" from the
context menu or press <Ctrl>+<Shift>+<v> in the programming window.
PLC types
Availability of ReadDataFromFileRegisterBank (see page 1330)
Variable Data type Function
BankNumber Specifies the bank number
BankOffset Specifies the bank number offset
DataNumberOfWords
INT
Number of word units to be read
from the file register bank
DataStartAddress ANY16 Specifies the start address of
data which is read from the file
register bank
For Relay T/C Register Constant
BankN
umber
WX WY WR WL - - DT LD FL dec. or hex
BankO
ffset
WX WY WR WL - - DT LD FL dec. or hex.
DataN
umber
OfWor
ds
WX WY WR WL - - DT LD FL -
DataSt
artAdd
ress
WX WY WR WL - - DT LD - -
Description
This instruction reads the number of words specified by DataNumberOfWords from File Register
Bank 1 or 2, as specified by BankNumber beginning with BankOffset, and writes it to
DataStartAddress.
Data types
Operands
Example
In this example the function has been programmed in ladder diagram (LD) and structured text (ST).
POU header
All input and output variables used for programming this function have been declared in the POU
header.
Body
If bGetData changes from FALSE to TRUE, the entire data unit variable awProcessDataToGet (a
DUT containing 11 elements) is filled with the data from File Register Bank 2 BankOffset 1000.