Overview

You can use the MBP_MSTR function block to configure both Modbus TCP and EtherNet/IP connected and unconnected explicit messages.

The operation begins when the input to the EN pin is turned ON. The operation ends if the ABORT pin is turned ON, or if the EN pin is turned OFF.

The CONTROL and DATABUF output parameters define the operation.

NOTE: The structure and content of the CONTROL and DATABUF output parameters differ for explicit messages configured using the EtherNet/IP and Modbus TCP protocols. Refer to the topics Configuring the Control Parameter for EtherNet/IP and Configuring the Control Parameter for Modbus TCP for instructions on how to configure these parameters for each protocol.

The ACTIVE output turns ON during operation; the ERROR output turns ON if the operation aborts without success; the SUCCESS output turns ON at the successful completion of the operation.

EN and ENO can be configured as additional parameters.

Representation in FBD

Input Parameters

Parameter

Data type

Description

ENABLE

BOOL

When ON, the explicit message operation (specified in the first element of the CONTROL pin) is executing.

ABORT

BOOL

When ON, the operation is aborted.

Output Parameters

Parameter

Data type

Description

ACTIVE

BOOL

ON when the operation is active.

OFF at all other times.

ERROR

BOOL

ON when the operation is aborted without success.

OFF before operation, during operation, and if operation succeeds.

SUCCESS

BOOL

ON when the operation concludes successfully.

OFF before operation, during operation, and if operation does not conclude successfully.

CONTROL1

WORD

This parameter contains the control block. The first element contains a code describing the operation to be performed. The content of the control block depends on the operation. The structure of the control block depends on the protocol (EtherNet/IP or Modbus TCP).

Note: Assign this parameter to a located variable.

DATABUF1

WORD

This parameter contains the data buffer. For operations that:

  • provide data — e.g., a write operation — this parameter is the data source

  • receive data — e.g., a read operation — this parameter is the data destination

Note: Assign this parameter to a located variable.

1. Refer to the topics Configuring the Control Block for EtherNet/IP and Configuring the Control Block for Modbus TCP for instructions on how to configure these parameters for the EtherNet/IP and Modbus TCP communication protocols.