Input Description

EN   BOOL \    (enable)

Processing of the Function Block is controlled via input EN.

EN = FALSE:

The outputs DONE, ERR and ERNO are set to “0” or FALSE, respectively. This is not valid during reading.

EN = FALSE/TRUE edge:

Reading of the data set is started once.

ATTRIB   BYTE \    (attribute)

At input ATTRIB, the Function Block operation (action) is specified.

Possible values:

1 - Open file, search sector, read data set (Open, Seek, Read), additionally needed inputs:

FILENO, SEG, FORMAT, NVAR, ADRVAR

2 - Open file, read data set (Open, Read), additionally needed inputs:

FILENO, FORMAT, NVAR, ADRVAR

3 - Read next data set (Read), additionally needed inputs:

FILENO, FORMAT, NVAR, ADRVAR

4 - Read data set, close file (Read, Close), additionally needed inputs:

FILENO, FORMAT, NVAR, ADRVAR

5 - Close file (Close), additionally needed inputs:

FILENO

SEG   DWORD \    (segment)

At input SEG, the start address of the segment label to be searched is specified. A segment label must be enclosed in brackets “[ … ]”.

Examples:

[Values_Tab1]

[Temperature_12]

The length is limited to 32 characters.

FILENO   BYTE \    (filenumber)

At input FILENO, the number of the file is specified from which data are to be read. Valid values: 0…99

FORMAT   BYTE \    (format)

Input Format is used to define the format of the data elements. All elements of one data set must have the same format.

Valid data formats:

00 hex - 0 - BYTE

01 hex - 1 - CHAR

10 hex - 16 - WORD

11 hex - 17 - INT

20 hex - 32 - DWORD

21 hex - 33 - DINT

NVAR   WORD \    (number \ of variable)

At input NVAR, the number of elements of the data set to be read is specified.

ADRVAR   DWORD \    (address \ of variable)

Input ADRVAR is used to specify the target start address of the data set. The values of a data set are stored in variables successively arranged in the PLC (e.g. ARRAY, STRING, %M area).