DeviceMaster UP Modbus
DeviceMaster UP Modbus
Controller to Controller Communication
UP
T
Today’s
Modbus installations are becoming increasingly
ccomplex. More and more installations are requiring the use of
multiple Modbus controllers and the need to share information
m
between the controllers is becoming increasingly important.
b
Sharing information between Modbus controllers can be
S
rrelatively easy if one controller can communicate as a master
((or client) and the other as a slave (or server). The master
ccontroller simply sends a message to the slave controller and
tthe slave responds. But what do you do when both controllers
ccan only be configured as masters or slaves?
The DeviceMaster UP, running with the Modbus/TCP firmware, can provide both master-to-master and
slave-to-slave controller connectivity. Bi-directional data paths can be created by connecting serial ports
and/or internal TCP/IP sockets together. The end result is an asynchronous, queued holding register
interface which can allow multiple Modbus controllers to communicate to each other.
Call or email for more information: 1.800.926.6876 | 763.957.6000 | IADSales@comtrol.com
3
1. Modbus Master-to-Master Connectivity
1.1 Communicating Between Two Modbus Masters
3
1.1.1 Two Modbus/TCP Masters
3
1.1.2 Two Serial Modbus Masters
4
1.1.3 Modbus/TCP and Serial Modbus Masters
4
1.1.4 One Modbus Master Communicating to Multiple Modbus Masters
5
6
2. Modbus Slave-to-Slave Connectivity
6
2.1 Communicating Between Two Modbus Slaves
2.1.1 Two Modbus/TCP Slaves
6
2.1.2 Two Serial Modbus Slaves
7
2.1.3 Modbus/TCP and Serial Modbus Slave
7
8
3. Creating Connections
3.1 Creating Serial Connections
8
3.2 Creating Internal TCP/IP Socket Connections
9
10
4. Configuring the Modbus Interface
4.1 Connecting Two Modbus Master Controllers
10
4.2 Connecting Two Modbus Slave Controllers
11
12
5. Controller-to-Controller Examples
5.1 Two Modbus Masters
12
5.2 Two Modbus Slaves
14
2
1. Modbus Master-to-Master Connectivity
Multiple Modbus masters can communicate to each other through the DeviceMaster UP.
Possible communication options include:
• Two Modbus masters communicating directly to each other.
• One Modbus master sending messages to be received by multiple
Modbus masters.
• Both Modbus/TCP and serial Modbus master communication.
1.1 Communicating Between Two Modbus Masters
1.1.1 Two Modbus/TCP Masters
As shown in the following diagram, two Modbus/TCP masters can communicate to each other
using either internal TCP/IP socket connections or connecting two serial ports.
3
1.1.2 Two Serial Modbus Masters
As shown in the following diagram, two serial Modbus masters can communicate to each other
using an internal TCP/IP socket connection.
Note: Serial connections could be made with a 4-Port DeviceMaster UP.
1.1.3 Modbus/TCP and Serial Modbus Masters
As shown in the following diagram, Modbus/TCP and serial Modbus masters can communicate
to each other using an internal TCP/IP socket connection.
Note: Serial connections could be made with a 4-Port DeviceMaster UP.
4
1.1.4 One Modbus Master Communicating to Multiple Modbus Masters
As shown in the following diagram, one Modbus master can send messages to more than one
other Modbus master. The following diagram displays an example of communication from one
master to several other masters.
5
2. Modbus Slave-to-Slave Connectivity
Modbus slaves can communicate to each other through the DeviceMaster UP. Possible communication options include:
• Two Modbus slaves communicating directly to each other.
• Both Modbus/TCP and serial Modbus slave communication.
2.1
Communicating Between Two Modbus Slaves
2.1.1 Two Modbus/TCP Slaves
As shown in the following diagram, two Modbus/TCP slaves can communicate to each other
using either internal TCP/IP socket connections or connecting two serial ports.
6
2.1.2 Two Serial Modbus Slaves
As shown in the following diagram, two serial Modbus slaves can communicate to each other
using an internal TCP/IP socket connection.
Note: Serial connections could be made with a 4-Port DeviceMaster UP.
2.1.3 Modbus/TCP and Serial Modbus Slaves
As shown in the following diagram, Modbus/TCP and serial Modbus slaves can communicate to
each other using an internal TCP/IP socket connection.
Note: Serial connections could be made with a 4-Port DeviceMaster UP.
7
3. Creating Connections
Creating the serial and internal TCP/IP connections is performed via the embedded configuration web pages on the DeviceMaster UP.
3.1 Creating Serial Connections
Serial connections required a two step process:
• Configure the two serial ports with the same serial settings (baud rate, stop bits, etc).
• Physically connect the two serial ports with the appropriate serial cable or wiring.
The following settings display a serial port configuration used to connect two serial ports
together:
8
3.2 Creating Internal TCP/IP Socket Connections
Internal TCP/IP connections require only a configuration that connects the two sockets.
• Configure the first TCP/IP socket to “Listen” mode.
• Configure the second TCP/IP socket to “Connect-Always” mode and to connect to the
listen port of the first socket on this gateway. (The IP Address of the gateway in this
example is 10.0.0.102.)
The following settings display a TCP/IP socket configuration used to connect two sockets
together:
9
4. Configuring the Modbus Interface
The DeviceMaster UP ports or sockets must be configured to Slave or Master mode depending
on the type of controllers being connected.
4.1 Connecting Two Modbus Master Controllers
Both the Receive and Transmit channels on the DeviceMaster UP must be set to “Slave” mode
to connect two Modbus masters.
The following settings display a “Slave” configuration:
Please note: The Modbus/TCP Master settings do not apply to Slave mode.
10
4.2 Connecting Two Modbus Slave Controllers
Both the Receive and Transmit channels on the DeviceMaster UP must be set to “Master” mode
to connect two Modbus slaves. Compared to Slave mode, more settings must be configured
to enable the DeviceMaster UP to operate as a master to both controllers. Please consult the
Modbus/TCP User Guide for more details.
The following settings display a “Master” configuration:
Please note: Serial slave controllers connected to this gateway can be accessed by setting the
“PLC IP Address” to that of the gateway.
11
5. Controller-to Controller Examples
5.1 Two Modbus Masters
The following diagrams demonstrate two Modbus Poll instances communicating to each other
through a serial port connection.
The above image displays Modbus Master 1 where:
• Device ID:
o The device ID of 255 is used to access all serial Raw/ASCII ports.
o The device ID of 254 is used to access TCP/IP socket ports.
o If desired, these connections can be accessed by alternate device IDs via the
Device ID Alias functionality.
• Address 1001 references serial port 1 received data holding registers. The Modbus
master polls this location for received data from the other controller.
• Address 1301 references serial port 1 transmit data holding registers. The Modbus
master writes to this location to send data to the other controller.
• The receive and transmit data format:
o The first 16 bit word is the sequence number. This is incremented when new
data is received and can optionally be incremented to indicate when to send
data to the other controller.
o The second word is the length in bytes.
o The following words are the data. The data can be received and/or transmitted in
either least significant (default) or most significant byte order.
12
The above image displays Modbus Master 2 where:
• Device ID:
o The device ID of 255 is used to access all serial Raw/ASCII ports.
o The device ID of 254 is used to access TCP/IP socket ports.
o If desired, these connections can be accessed by alternate device IDs via the
Device ID Alias functionality.
• Address 2001 references serial port 2 received data holding registers. The Modbus
master polls this location for received data from the other controller.
• Address 2301 references serial port 2 transmit data holding registers. The Modbus
master writes to this location to send data to the other controller.
• The receive and transmit data format:
o The first 16 bit word is the sequence number. This is incremented when new
data is received and can optionally be incremented to indicate when to send data
to the other controller.
o The second word is the length in bytes.
o The following words are the data. The data can be received and/or transmitted in
either least significant (default) or most significant byte order.
13
5.2 Two Modbus Slaves
The following diagrams demonstrate two Modbus Slave instances communicating to each other
through a TCP/IP socket port connection.
The above image displays Modbus Slave 1 where:
• Device ID of 1 is the configured device ID.
• The receive address of 1 is the configured receive holding register address. The
DeviceMaster UP will place the formatted received data here.
• The transmit address of 21 is the configured transmit holding register address. The
DeviceMaster UP will look for the formatted transmit data here.
• The receive and transmit data format:
o The first 16 bit word is the sequence number. The sequence number is
incremented when new data is received and must be incremented to indicate
when to transmit data to the other controller.
o The second word is the data length in bytes.
o The following words contain the data. The data can be received and/or
transmitted in either least significant (default) or most significant byte order.
14
The above image displays Modbus Slave 2 where:
• Device ID of 2 is the configured device ID.
• The receive address of 2001 is the configured receive holding register address. The
DeviceMaster UP will place the formatted received data here.
• The transmit address of 2021 if the configured transmit holding register address. The
DeviceMaster UP will look for the formatted transmit data here.
• The receive and transmit data format:
o The first 16 bit word is the sequence number. The sequence number is
incremented when new data is received and must be incremented to indicate
when to transmit data to the other controller.
o The second word is the data length in bytes.
o The following words contain the data. The data can be received and/or
transmitted in either least significant (default) or most significant byte order.
LT1483A
15
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising