-

PDI_READ

Type Function block
Description Reads the PDI objects of local Axioline modules.

Reading is started in the cycle in which the rising edge is detected at the REQ input. The duration of the read operation depends, among other things, on the bus structure, the type of the object read, etc. Once the read operation is complete the NDR output is set to TRUE. The receive data saved in RD_1 is only valid and readable during the cycle in which NDR is TRUE.

In the event of an error, the ERROR output is set to TRUE. The corresponding error code can be read at the STATUS output. The error information saved in the STATUS array is only valid and readable during the cycle in which the ERROR output is set to TRUE. In the following cycle the ERROR output is set to FALSE. The user can now set the REQ input to FALSE to prepare the next read operation. In the following cycle the next read operation can be executed with a rising edge at the REQ input.

If an invalid variable type or an array with an invalid length is applied to RD_1 or STATUS, the ERROR output is set to TRUE and, if possible, the corresponding error code is output at the STATUS output. In this case the ERROR output remains TRUE until the error has been eliminated. While ERROR = TRUE, the corresponding error code can be read at the STATUS output.
Notes Function blocks have to be instantiated. The instance name of the function block has to be declared in the 'Variables' table of the POU where the FB is going to be used. The instance name must be unique within the POU.

Tip: Phoenix Contact provides function block libraries free of charge which simplify the handling of specific Axioline modules. You can download these libraries from the controller's web page ('Downloads' tab) under www.phoenixcontact.com.
Parameters Inputs

REQ

SLOT

SUBSLOT

INDEX

SUBINDEX

Input/Output

RD_1

STATUS

Outputs

DAT_CNT

NDR

ERROR
Error codes Error codes at the STATUS output