Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this tutorial, we will be demonstrating the ability of the RediGate to subscribe to topics published by another RediGate in JSON data format, and serve that data up to a Modbus TCP host. The second part of the example will show command data going from the Modbus host to the field RediGate.

This tutorial uses two RediGates with Internet connectivity to the AWS IoT service. (You could use a similar configuration to a generic MQTT broker, but note that because of MQTT topic restrictions, there may be additional requirements to make the Peer-to-peer application work properly on some platforms, such as IBM or Azure IoT.)

In this example, the two sites are called "Remote Data Publisher" and "Local Data Concentrator" for identification purposes only.

This example illustrates the ability of the RediGate to serve as a cellular replacement for two sites using point-to-point radios for communication. With some adaptation, it may also be used for sharing data in a point-to-multipoint arrangement.

...

  1. Two RediGate 100 or 400 series device with internet connectivity
  2. Completion of the Getting Started Guide and RediGate to AWS IoT for your respective RediGate device (RediGate 100 Series or RediGate 400 Series)
  3. AWS account with the AWS IoT service enabled (https://aws.amazon.com/iot/)

...

 Example 1: Testing P2P Communication

 


  1. After loading configurations to both RediGates, test that you are seeing MQTT subscriptions.
    From the Main Menu, select 3 (Diagnostic Services), and 17 (MQTT Status).


  2. Set up your Modbus host to poll the "P2P-Concentrator" RediGate using the IP address configured in your device, on the interface that you opened in the Firewall (above).

    Info
    titleModbus Versions

    NOTE: There are different implementations of TCP/IP Modbus protocol among vendors. You need to be aware of these differences in order to properly set up a Modbus polling network.

     For instance:
    - Open Modbus/TCP typically uses port 502. It's Modbus format is slightly different from standard Binary Modbus.
    - Binary Modbus over TCP/IP doesn't have a defined port. This example configuration uses port 3040.
    - Either port 502 or 3040 may be used in this RediGate example—the same data is available on both ports.
    - The data used in this example includes 44001-44006 (six 16-bit integers) and 46001-46002 (one 32-bit float, little-endian).


  3. Poll the "P2P-Concentrator RediGate using a Modbus TCP client. You should see the data being generated by the "P2P-Field1" RediGate.

...

Tip
titleComplete

Congratulations! You can successfully send data between two point-to-point RediGates. Check out our "Field Device Quick Starts" found at http://redigate.elecsyscorp.com/examples for examples showing how to connect the RediGate to 60+ industrial protocols.