-

WRREC

Type Function block
Description The function block is used to write a data record to a Profinet IO device. The block is executed by REQ = TRUE. The Profinet address ID of the device/slot/subslot to which the data record is written is specified with the ID input. The INDEX input identifies the data record to be written. The length of the data record to be written (in byte) is specified with the LEN input.

The DONE output indicates whether the data record has been successfully written to the Profinet IO device.

The values of the RECORD and LEN parameters shall not be changed as long as BUSY = TRUE.

If an error occurs during execution of the function block, the ERROR output is set to TRUE. The STATUS output indicates the error code.
Notes
  • Before calling the function block, an Application Relation (AR) with the communication partner should be completely established.
  • All parameters have to be set.
  • A maximum of 32 instances of the function block is allowed in the PLCnext Engineer project.
  • 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.
Parameters Inputs

REQ

ID

INDEX

LEN

Input/Output

RECORD

Outputs

DONE

BUSY

ERROR

STATUS
Error codes Error codes at the STATUS output