How to Set Up your Maple PLC as a Modbus RTU Master Device

How to Set Up your Maple PLC as a Modbus RTU Master Device

This tutorial will cover Modbus RTU communication between two Maple PLC’s. A Maple Modular PLC as the slave device and a Maple Micro PLC as the master device.

Software Required

Hardware Required

In this tutorial a Maple Micro PLC-FB1616P will be the master device and a Maple Modular PLC-ES0808P is the slave device.

* Note – Any Maple Modular or Maple Micro PLC can be used.

Modbus RTU Wiring Configuration

For RS-232 Serial Connection, all of the Maple PLC’s DO NOT have a null-modem swap built in, so RX needs to be terminated at TX and TX needs to be terminated at RX. Ground connects to Ground.

Null Modem – This means that a cable is specifically designed to allow direct communication between two serial devices by using RS-232 communication ports. For this to happen the transmit (TX) and Receive (RX) pins of the serial connectors are flipped, so TX connects to RX and RX connects to TX.

Modbus RTU Master Configuration (Maple Micro PLC)

  • Right click on Program
  • Select New Program
  • Choose MODBUS/RTU Master
  • Press OK

The Special Function program will open

  • For RS-232 you will need to select Ch1. RS-485 is Ch2.
  • Choose Slot 0, as this is the slot the PLC is assigned.

Next, add a function.

  • Click Add
  • Choose the specific function (ex. 02 Read Input Status 1x)
  • Choose the correct Station No. (ex. 1 – Must match slave device)
  • Choose the correct Start Address ( ex. 1 – Must match slave device)
  • Choose which register to store the data (ex. M00)
  • Click OK

After adding a function, make sure to always click Save.

Next, configure your PLC Parameters

  • Select the Ch 1 Tab
  • Make sure the Station Number matches the slave device.
  • Configure the communication parameters and make sure they match the slave device.
  • Select the Modbus Tab
  • Make sure the Slave ID matches the slave device.

Modbus RTU Slave Configuration (Maple Modular PLC)

  • In your Modbus RTU Slave project, right click on PLC Parameter
  • Click the Ch 1 Tab
  • Make sure these parameters match the master device parameters.
  • Click the Modbus tab
  • Make sure this matches the master device.
  • You can add the Digital Input register to your Device Monitor. X00 in this case. When 24V are sent to X00, it will change from 0 to a 1. This will also reflect on the master device.

Online Communication

Maple Micro PLC – Master Device

Maple Modular PLC – Slave Device

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 Sample Project (Slave Device Project)

Download MapleLogic Sample Project (Master Device Project)

Resources & Documentation

Maple PLC/MapleLogic Resources

More
Tutorials
Sample Projects

See our Support Center for a complete list of Quick Start and Installation Guides

Scroll to Top