Modbus Messaging Service

The 171 CBU 98090 and 171 CBU 98091 processors provides a Modbus Messaging service that permits remote devices to connect to–and communicate with–the processor. The processor supports up to 16 simultaneous Modbus TCP server connections.

Controlling Access

Use the Access Control list in the Messaging tab to restrict access to the processor in its role as Modbus TCP server. When Access Control is enabled, only devices with IP addresses added to the list can communicate with the processor over TCP port 502. The Access Control list can contain up to 128 devices.

If you enable Access Control, consider granting access to the following devices:

  • your maintenance laptop

  • every target device to which the processor adapter may send a Modbus TCP message

When Access Control is disabled, any Ethernet device can establish a TCP connection with the processor.

Navigating to the Messaging Configuration Tab

To open the Messaging tab:

Step

Action

1

In the Project Browser, navigate to the Project > Communication > Networks node.

2

Double-click the appropriate Ethernet network to open its configuration dialog.

3

Select the Messaging tab to open that page:

4

Enter the parameter settings for Access Control. Refer to the Access Control configuration parameters (below).

5

Click the validate check box in the upper tool bar to confirm the Modbus Messaging parameter settings.

Configuring Access Control

To enable the access control function:

Step

Action

1

In the Connection Configuration area, select Access Control. The Access Control list is enabled.

2

To grant a remote device permission to access the processor, complete a row in the list as follows:

  • Place a check mark in the Access column.

  • Type in the IP address for the remote device.

The added device is permitted to open a TCP connection to the processor when Access Control is enabled.

3

Repeat step 2 for every remote device–up to 128 devices–that you want to be able to open a TCP connection to the processor.

NOTE: If you select the Access Control check box but do not enter device addresses in the Access Control list, no Ethernet communications to or from the processor can occur.

Modbus TCP Messaging Commands

The processor supports the following Modbus TCP commands

Function Code / Sub-Code

Description

FC01

Read coils.

FC02

Read discrete inputs.

FC03

Read multiple registers.

FC04

Read input registers.

FC05

Write single coil.

FC06

Write single register.

FC07

Read exception status.

FC08 / 00

Return query data.

FC08 / 11

Return bus message count.

FC08 / 12

Return bus communication detected error count.

FC08 / 13

Return bus exception detected error count.

FC08 / 14

Return slave message count.

FC08 / 15

Return slave no response count

FC08 / 16

Return slave NAK count

FC08 / 17

Return slave busy count.

FC08 / 18

Return bus character overrun count.

FC08 / 21

Diagnostics Ethernet

FC08 / 22

Retrieving Ethernet channel-specific data from an Ethernet port

FC11

Get communications event counter: for serial line only.

FC12

Get communications event log: for serial line only.

FC15

Write multiple coils.

FC16

Write multiple registers.

FC22

Mask write register.

FC23

Read/write multiple registers.

FC43 / 14

Read device identification.