Modbus TCP Slave Configuration

Introduction

The RediGate can convert over 60+ field devices into Modbus (TCP or serial) or DNP slave devices. This tutorial shows how to setup your RediGate to act as a Modbus TCP slave that can be polled by a Modbus TCP master such as a PLC, SCADA system, or OPC server. This tutorial uses a RediGate 120e to demonstrate this functionality, but it applies to any RediGate device that can be polled as a Modbus slave on a TCP network.

Pre-Requisites

  1. A RediGate 100 or 400 series device with network connectivity
  2. Completion of the Getting Started Guide for your respective RediGate device (See RediGate 100 Series Getting Started Guide or RediGate 400 Series Getting Started Guide)
  3. Ability to ping the Modbus master device (PLC, SCADA, OPC, etc.) from the RediGate  (see Ping Utility for information regarding how to ping network devices from the RediGate)

Instructions

  1. Using ACE, Open the default config you used in the "Getting Started Guide"
  2. Download and open Modbus-TCP-Slave-Demo.xml from the http://redigate.elecsyscorp.com/examples site within the same ACE window

  3. Disable Virtual Unit 3 by clearing its Enabled checkbox.
  4. Copy and paste the following objects from the Elecsys-AWS-Demo.xml config into your default configuration:
    1. FieldUnitInternalMast2 (paste under NullCircuit)

    2. VirtualRW Unit 4 (paste under NullCircuit)
    3. Data Simulator (paste under Internal Channel 15)
    4. SlaveModbusTCP0 (paste under SlaveChannels)
  5. Update the EtherPort settings so that your RediGate is on the same network as the Modbus master device

  6. Update the firewall object to allow traffic on port 502 for the Ethernet port that the Modbus master connects to. In the screenshot below, we add port 502 to both the eth0 and eth1, allowing Modbus traffic on either port of our 120e

  7. Edit the "Internal Channel 15" object so that it contains a scan record for FieldUnitInternalMaster2 (Unit Address 2), poll record 1, with a Scan Period of 1 second: