0% found this document useful (0 votes)
30 views

MODBUS Server COM Ethernet

This document provides guidelines for connecting an HMI to a PLC using MODBUS protocol over serial or Ethernet connections. It outlines the recommended settings for the HMI and PLC such as baud rate, data bits, parity, and stop bits for serial COM connections as well as port numbers for Ethernet UDP and TCP/IP connections. Additionally, it specifies the MODBUS function codes and device address ranges supported by the PLC and provides wiring diagrams for serial RS-232, RS-485 4W, and RS-485 2W connections.

Uploaded by

zaki abbas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

MODBUS Server COM Ethernet

This document provides guidelines for connecting an HMI to a PLC using MODBUS protocol over serial or Ethernet connections. It outlines the recommended settings for the HMI and PLC such as baud rate, data bits, parity, and stop bits for serial COM connections as well as port numbers for Ethernet UDP and TCP/IP connections. Additionally, it specifies the MODBUS function codes and device address ranges supported by the PLC and provides wiring diagrams for serial RS-232, RS-485 4W, and RS-485 2W connections.

Uploaded by

zaki abbas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

PLC Connection Guide

MODBUS Server (COM/Ethernet)

HMI Setting:
Parameters Recommended Options Notes
PLC type MODBUS Server (COM/Ethernet)
PLC I/F RS232 RS232, RS485
9600~115200 Ethernet supports UDP or TCP/IP
Baud rate 9600
Ethernet protocol
Data bits 8 8
Parity Even Even, Odd,
Stop bits 1 None
1
PLC sta. no. 1 1-31 HMI Modbus Station No.
Port no. 502

Online simulator YES Extend address mode NO


Broadcast command NO

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.
PLC Connection Guide

PLC Setting:
Communication mode Modbus 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”, [PLC I/F] set 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. can not be set identically to HMI Port No. When doing so, the
warning message below will be shown requesting users to change setting.
PLC Connection Guide

Note:
A maximum of 64 Clients can be connected simultaneously.
Modbus Server Port No. can’t 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”, [PLC I/F] set to [Ethernet] to finish setting.
PLC Connection Guide
For Modbus Server TCP/IP, HMI Port No. is the same as Modbus Server Port No. To
change Prot No. go to [System Parameter Settings] / [Model], the default Port No. is
“8000”, and it is allowed to change Modbus Server Port No. here.

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.

Note the following two points when enabling the [MODBUS TCP/IP Gateway]:
a. The original mapping between the MODBUS Server and the HMI address will be
canceled.
b. The SCADA cannot read from or write in the addresses defined in different Address
Mapping Table at one time.
For more information about this, see “Chapter37 MODBUS TCPIP Gateway”.
PLC Connection Guide

c. The following functions are only supported by cMT series models.

Device Address:
Bit/Word Device type Format Range Memo
B LB dddd 0 ~ 9998 Mapping to 0x/1x 1 ~ 9999
W LW dddd 0 ~ 9998 Mapping to 3x/4x 1 ~ 9999
W RW ddddd 0 ~ 55536 Mapping to 3x/4x 10000 ~ 65536

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

Supported Modbus Server Function Code:


Function Code Description
0x01 Read Coils
0x02 Read Discrete Inputs
0x03 Read Holding Register
0x04 Read Input Register
0x05 Write Single Coil
0x06 Write Single Register
0x0f Write Multiple Coils
0x10 Write Multiple Registers
PLC Connection Guide

Modbus Server Error Code:


Error Code Definition Condition
01 Incorrect function code The function code is not supported.
02 Incorrect read address The read address is not within the range.
The data read is incorrect, for example, the
03 Incorrect data
data length is 0.
Read/Write exceeding number of words
251 Incorrect data
from/to the register of the Modbus device.
252 Incorrect data Modbus device replies incorrect data format.
253 Incorrect data Modbus device checksum error.

Wiring Diagram:
RS232 (Diagram 1 ~ Diagram 3)
Diagram 1
RS-232
The serial port pin assignments may vary between HMI models, please click the following
link for more information.

HMI PLC

Link RS232

Rx TXD

Tx RXD

GND GND

RTS

CTS
PLC Connection Guide
Diagram 2
RS-485 4W
The serial port pin assignments may vary between HMI models, please click the following
link for more information.

HMI PLC

Link RS485 4W

Rx- Tx-

RX+ Tx+

Tx- Rx-

Tx+ Rx+

GND GND

Diagram 3
RS-485 2W
The serial port pin assignments may vary between HMI models, please click the following
link for more information.

HMI PLC

Link RS485 2W

Data- D-

Data+ D+

GND GND
Note: Setting more than one Modbus Server in HMI Device List is of no effect.
PLC Connection Guide
Diagram 4
Ethernet cable:

You might also like