How to use a single COM port to connect with two devices

Introduction:

Within this example, we demonstrate how to use the physical COM port on an MT8050iE to communicate with two Modbus RTU slave devices. The MT8050iE being a Modbus RTU master, while the other units in this system will act as Modbus slaves.

Software Version:

EasyBuilder Pro 6.03.02.463+

Instructions:

Serial Cable Pinout

When using an HMI that has only one serial COM port a special cable must be used to communicate with more than one device. In addition, the individual that designs the cable must ensure that it has an appropriate pinout for each device.
Note: The HMI pinouts can be found within the HMI Pin Assignment Guide.

Note: In this example, the following cable is used to communicate with both devices simultaneously.
thumbnail

Communication Overview

HMI Model COM Port Driver Interface
Client/Master MT8050iE COM 1 Modbus RTU, RTU over TCP RS232
COM 3 Modbus RTU, RTU over TCP RS485 2W
Server/Slave 1 eMT3070 COM 3 Modbus Server RS232
Server/Slave 2 cMT3072 COM 2 Modbus Server RS485 2W

Modbus RTU Master

  1. Within EasyBuilder Pro, navigate to the “Device” tab in the “System Parameter Settings”:

  2. Select “New Device/Server”:

  3. Select “Modbus RTU, RTU over TCP” from the “Device type” drop-down list in the following window:

  4. Select the “Settings…” button to configure COM port settings for the device driver. We’ll choose “COM 1” (virtual COM port) for this example. Choose the appropriate COM interface from the “I/F” drop-down list. For this demonstration, we’ll choose “RS-232”:
    Note: A COM port must be selected before choosing an interface from the “I/F” drop-down list.

  5. Repeat steps 1-2 to add a second device. In this example, we’ll select the “Modbus RTU, RTU over TCP” driver from the “Device type” drop-down list. Within the “I/F” drop-down list we’ll select “RS-485 2W” as in this example:
    Note: An appropriate COM port must be set in order to select this interface.

  6. Select the “Settings…” button to configure COM port settings for the device driver. EasyBuilder Pro will not allow the same COM port to be used twice, so we must select a different COM (virtual COM port) port: