Reading Modbus Data with ControlCom Edge Server

The ControlCom Connect platform allows fully configuring a onboarded device Edge Server configuration to read Modbus data.

Prerequisites

Creating a variable

To create a new variable in ControlCom Connect:

  1. Navigate to Administration > Devices
  2. Select a onboarded device
  3. In the device page, click the Variables tab
  4. Click the "+ New Variable" button
  5. Enter the Variable Name, Description, Topic Property path
  6. Select the Type of the data with options boolean, number, or string.
  7. Enable the Store Data toggle if wanting to view historical values through Visualization
  • Important Note If Store Data is disabled, it will still allow live data to come into the system for viewing, but the system will not save the data and you will not be able to visualize it
  1. Click the "Add Variable" button
Devices Page
Devices page in ControlCom Connect
Device Variables Menu
Variables Menu for a Device in ControlCom Connect
Add new device variable
Add new variable dialog in ControlCom Connect

Creating a Modbus Client

To create a new modbus client in ControlCom Connect for device:

  1. Navigate to Administration > Devices
  2. Select a onboarded device
  3. In the device page, click the Edge Server tab
  4. Click the "+ Add Client" and select Modbus TCP or Modbus RTU (For this guide, use Modbus TCP)
  • Important Note If using Modbus RTU, the ControlCom Edge Server requires a volume mount to the location of the device which this guide does not cover.
  1. A new subitem will appear called "Clients", select the newly added client.

Connection Sub Menu

  1. Enter in a friendly name for the Modbus Client Name
  2. Enter the Endpoint IP (local network of modbus device to read from) such as 192.168.1.1 or localhost
  3. Enter the Endpoint Port (typically 502 for Modbus TCP)
  4. Set Client Concurrency to 1
  5. Set Round size to 36
  6. Set Interval to 1000
  7. Set Timout to 15
  8. Enable or disable Zero Based depending on Modbus device.
  9. Enable the Enabled toggle to enable the client

Connection Client Configuration

Client Concurrency is how many simultaneous Modbus requests can be in flight.

Round Size The maximum number of consecutive registers to read in a single Modbus request.

Interval How often in milliseconds to poll Modbus devices for data.

Timeout Maximum time in seconds to wait for a Modbus response before considering the request failed.

Units Sub Menu

  1. Click the "Add New Modbus Unit" button
  2. Enter the expected Unit ID
  3. Depending on the Modbus device, toggle between Big Endian and Little Endian. If Big Endian is expected, toggle bigEndian to the on position.
  4. Depending on the Modbus device, toggle swapWords on or off. This configures the byte order configuration when reading 32-bit or larger data types.
  • Example
Example: 32-bit float value 0x12345678

Normal order: Register 1 = 0x1234, Register 2 = 0x5678
Swapped words: Register 1 = 0x5678, Register 2 = 0x1234

Tags Sub Menu

  1. Click the "+ Add Item"
  2. Select the created item in the list of tags window
  3. Enter the expected Unit ID (defaults to 1)
  4. Select the Address Scope for the data either Coils/Physical State, Discrete Inputs/Internal State, Input Registers/Physical Register, or Holding Registers/Internal Register
  5. Select the Topic Property Path (this is the Variable created earlier in the guide)
  6. Select the Data Type for the Modbus register(s)
  7. Enter the expected address where the data to be read is located
  • Example If the full address is 400001 for the data, then the address is 1 as a Holding Register/Internal Register.
  1. Set the scale of the value (defaults to 1). If the data is reading as 857, but the expected is 8.57, set the scale to 0.01.
  2. Set the offset of the value (defaults to 1). It is a constant value added or subtracted from the raw register value to shift the final result.
  3. Set the decimals of the value (defaults to 2). How many decimals should the read value contain

Saving

After configuring Connection, Units, and Tags, click the "Save Configuration" button and click "Save" in the confirmation popup.

Devices Edge Server Page Modbus Connections tab
Device Edge Server Page Modbus Connections Tab in ControlCom Connect
Devices Edge Server Page Modbus Units tab
Device Edge Server Page Modbus Units Tab in ControlCom Connect
Devices Edge Server Page Modbus Tags tab
Device Edge Server Page Modbus Tags Tab in ControlCom Connect

Deployment

Once the Edge Server has been configured to read from a Modbus client, the changes can be deployed in a few ways. The Edge Server will pick up its changes on the next boot of the container.

Sending restart command from ControlCom Connect Platform

  1. Navigate to Administration > Devices
  2. Select the Device with the new Modbus configuration
  3. On the Details tab, click the restart button. This will stop the instance where it is currently running.

Stopping and starting the ControlCom Edge Server manually

This can be done by following the restart commands from the Onboarding Guide of the Edge Server

Restarting Device
Device Details page on ControlCom Connect

Was this page helpful?