The leader in industrial automation and control solutions

Introduction

All Maple Systems HMIs programmed with EBPro (EasyBuilder Pro), including every cMT X Series and cMT Series model, are compatible with Modbus Server (COM/Ethernet). Configure your Controller and HMI/cMT with the following parameters to establish reliable communication.

HMI Setting

ParametersRecommendedOptionsNotes
PLC typeMODBUS Server (COM/Ethernet)
PLC I/FRS232RS232, RS485, EthernetEthernet supports UDP or TCP/IP protocol
Baud rate96009600~115200
Data bits88
ParityEvenEven, Odd
Stop bits11
PLC sta. no.11-31HMI Modbus Station No.
Port no.502
Online simulatorYES
Extend address modeNO
Broadcast commandNO

NOTE: If HMI is Modbus Server, connecting two or more Modbus Servers with one Modbus RTU via RS485 4W is not supported. To do so, use RS485 2W instead.

Diagram showing one Modbus RTU master connected via RS-485 to two HMI Modbus Server stations labeled Station 1 and Station 2.

PLC Setting

Communication modeValue
Communication modeModbus RTU protocol

Modbus Server UDP Protocol Setting

MODBUS Server (Ethernet) supports UDP communication protocol. To use UDP mode, go to System Parameter Settings in editing software, in Device list click New, for PLC type select Modbus Server, set PLC I/F to Ethernet, and select Use UDP (User Datagram Protocol) to finish setting.

Modbus Server Port No. can be changed by clicking Settings.

Modbus Server Port No. cannot be set identically to HMI Port No. When doing so, the warning message below will be shown requesting users to change setting.

Device Properties dialog with PLC type set to MODBUS Server, PLC I/F set to Ethernet, and the Use UDP (User Datagram Protocol) checkbox checked.

NOTE: A maximum of 64 Clients can be connected simultaneously. Modbus Server Port No. cannot be identical to HMI Port No.

Modbus Server TCP/IP Protocol Setting

MODBUS Server (Ethernet) supports TCP/IP communication protocol. Go to System Parameter Settings in editing software, in Device list click New, for PLC type select Modbus Server, set PLC I/F to Ethernet to finish setting.

Device Properties dialog with PLC type set to MODBUS Server and PLC I/F set to Ethernet, with the UDP checkbox unchecked for TCP/IP mode.

For Modbus Server TCP/IP, HMI Port No. is the same as Modbus Server Port No. To change Port No. go to System Parameter Settings / Model, the default Port No. is 8000, and it is allowed to change Modbus Server Port No. here.

System Parameter Settings dialog open on the Model tab, showing the Port no. field set to 8000 used as the MODBUS server port number.

MODBUS TCP/IP Gateway

By adding MODBUS Server with Ethernet interface, the MODBUS TCP/IP Gateway feature can be enabled by selecting the Enable check box.

Device Properties dialog showing MODBUS Server with Ethernet interface and the MODBUS TCP/IP Gateway section with the Enable checkbox checked.

Note the following two points when enabling the MODBUS TCP/IP Gateway:

  • The original mapping between the MODBUS Server and the HMI address will be canceled.
  • The SCADA cannot read from or write to the addresses defined in different Address Mapping Tables at one time.
Address Mapping Table dialog listing entries that map MODBUS coil and register addresses to Local HMI LB, LW, and RW addresses with read/write permissions.

NOTE: The following functions are only supported by cMT series models.

Two checkboxes labeled Use zero values as read responses for undefined registers and Accept write multi registers command for undefined registers, both checked.

Device Address

Bit/WordDevice typeFormatRangeMemo
BLBdddd0 ~ 9998Mapping to 0x/1x 1 ~ 9999
WLWdddd0 ~ 9998Mapping to 3x/4x 1 ~ 9999
WRWddddd0 ~ 55536Mapping to 3x/4x 10000 ~ 65536

LB0 = 0x0001, LB1 = 0x0002, LW0 = 3x0001, LW1 = 3x0002

Supported Modbus Server Function Codes

Function CodeDescription
0x01Read Coils
0x02Read Discrete Inputs
0x03Read Holding Register
0x04Read Input Register
0x05Write Single Coil
0x06Write Single Register
0x0fWrite Multiple Coils
0x10Write Multiple Registers

Modbus Server Error Codes

Error CodeDefinitionCondition
01Incorrect function codeThe function code is not supported.
02Incorrect read addressThe read address is not within the range.
03Incorrect dataThe data read is incorrect, for example, the data length is 0.
251Incorrect dataRead/Write exceeding number of words from/to the register of the Modbus device.
252Incorrect dataModbus device replies incorrect data format.
253Incorrect dataModbus device checksum error.

Wiring Diagrams

NOTE: The serial port pin assignments may vary between HMI models.

Diagram 1: RS-232

HMIDirectionPLC
Pin assignmentsRS232
Rx↔ (bidirectional)TXD
Tx↔ (bidirectional)RXD
GND↔ (bidirectional)GND
↕︎ (tie)RTS
CTS

Diagram 2: RS-485 4W

HMIDirectionPLC
Pin assignmentsRS485 4W
Rx-↔ (bidirectional)Tx-
RX+↔ (bidirectional)Tx+
Tx-↔ (bidirectional)Rx-
Tx+↔ (bidirectional)Rx+
GND↔ (bidirectional)GND

Diagram 3: RS-485 2W

HMIDirectionPLC
Pin assignmentsRS485 2W
Data-↔ (bidirectional)D-
Data+↔ (bidirectional)D+
GND↔ (bidirectional)GND

NOTE: Setting more than one Modbus Server in HMI Device List is of no effect.

Diagram 4: Ethernet Cable

Ethernet straight-through cable wiring diagram showing all 8 color-coded wire pairs connected pin-to-pin from one end to the other.