Your cart is currently empty!
How to Set Up your Maple PLC and Maple HMI using Modbus RTU and TCP Communications
This tutorial will cover Modbus Communication via RTU and TCP between a Maple PLC and a Maple HMI. The PLC as an RTU slave and the HMI as the master device.
Software Required
Hardware Required
- Maple Modular PLC’S – Any Maple Modular PLC can be used.
- Maple Micro PLC’S – Any Maple Micro PLC can be used.
- cMT3102Xv2 – Other cMT or HMI devices can be used.
* Both the Maple Modular and the Maple Micro have built in Modbus RTU/TCP Slave and Master capabilities via RS-232 or RS-485 for RTU and an ethernet port for TCP. In this tutorial, it will be an example using a Maple Modular PLC-ES1616P connected via RS-232 and Ethernet to a cMT3102X HMI. The Maple Modular as the slave and the HMI as the master device. *
Note: All of the Maple PLC’s can connect to any device that has Modbus Capabilities via RTU or TCP.
Modbus RTU Communication Wiring


Please refer to your HMI’s Installation Guide to view your Serial Connection. cMT3102X Installation Guide
Example:

Modbus RTU Slave Configuration

Click the + on the Parameter tab in the project window > Double Click PLC Parameter > Click the CH1 tab for Modbus RTU Serial RS-232 > Adjust the Communication Settings to match the Master Device (cMT 3102X).
Modbus RTU Master Configuration

Click Home > System Parameters > New Device/Server > Select Modbus RTU Master

Select RS-232 > Select COM3 (MUST be COM3 for RS232) > Station no. “1” (Same as RTU Slave Device)

Match the same COM Port settings as the RTU Slave device (Maple Modular PLC)
Modbus TCP Network Configuration

Modbus TCP Slave Configuration

Double Click on PLC Parameter > Ethernet tab > Enter the slave device IP address. MUST be on the same subnet (255) as your PC and Master device (255) but the last octet in the IP address MUST be different (35).

Your Modbus TCP Master device’s IP address should be on the same subnet (255) as the slave device but the last octet MUST be different (33)

Click on the Modbus tab > Enter the Slave ID (MUST match the Slave ID for the Master device).
Modbus TCP Master Configuration

Click Home > System Parameters > New Device/Server > Select Modbus TCP IP/Master > Click Settings set the IP address (MUST match the Slave device). > Type the station number (MUST match the Slave device).
Modbus Addressing


Double click on an object in the project > Select the device (RTU or TCP Master) > Type the correct Modbus address > Click OK
Repeat this for each object in your project.
To get more information on Modbus addressing please watch the video
Modbus RTU/TCP Ladder Diagram in Maple Logic

Above is a display of the ladder diagram for getting the Digital I/O and Analog I/O from a PLC-ES1616P connected via Serial RS-232 or via TCP. The logic would be the same for both RTU and TCP. To get a detailed description please watch the video and download the attached sample project.
User Interface

cMT Viewer (cMT3102X)
Sample Project
The project shown above was designed for the specific hardware mentioned at the beginning of the tutorial and is intended to provide you guidance when programming your unit. If you are using models other than the ones specified in this sample project, similar steps can be duplicated within your own project.
Download MapleLogic and Easy Builder Pro Sample Project
Importing Modbus Tags into EBPro
Video Resource:
Resources & Documentation
Maple PLC/Maple HMI Resources
See our Support Center for a complete list of Quick Start and Installation Guides

About the Author