Modbus

A Modbus interface uses the Modbus TCP protocol to connect Arundo Edge to an industrial control system. Once you establish a Modbus interface, you can stream sensor data collected by a control system directly into Arundo Edge.

Example

Here's an example of a Modbus interface.

Modbus interface


Video


Supported Functions

Arundo Edge supports the following Modbus functions:

Code Name Description
01 Read Coil Status Reads the ON/OFF status of discrete coils in the slave
02 Read Input Status Reads the ON/OFF status of discrete inputs in the slave
03 Read Holding Registers Reads the binary contents of holding registers in the slave
04 Read Input Registers Reads the binary contents of input registers in the slave
05 Write Single Coil Writes a single coil to ON/OFF
06 Write Single Register Writes a value into a single holding register

You can set up a Modbus interface to use any combination of these functions.


Adding a Modbus Interface

Complete the following to connect Arundo Edge to an industrial control system via the Modbus TCP protocol.

  1. On the sidebar, select Interfaces | Add new.
  2. Select Modbus.
  3. In Name, enter the name of the control system.
  4. In Connection Type, select "TCP".
  5. In URL, enter the connection address for the control system.
  6. In Port, enter the port used for connections to the control system.
  7. Complete the remaining fields as necessary.
  8. Click Add interface.
  9. Click Add Function Call.
  10. In Name, enter a name to describe the function call.
  11. In Function Type, select the function to perform.
  12. Complete the remaining fields as necessary.
  13. Click Add.
  14. Click Browse in the Operation column for the function call.
  15. In Quantity, select the quantity of bits the tag value spans.
  16. Under Select address space (browse), adjust the slider control and use the Raw Hex Output matrix to locate the correct bit address.

    Tip

    Use the Trim the focused bit address window slider to narrow the bit address scope.

  17. Under Viable types, select the value to use for the tag.

  18. Click Add Tag.
  19. Add additional function calls and tags as necessary.

Setting Up a Closed-Loop Control

You can also set up a closed-loop control using a Modbus interface. This gives you the ability to collect data from a control system and write values back based on certain conditions.

As an example, we will set up a closed-loop control that:

  • Collects output values from the control system
  • Sends values back to the control system that are the sum of a compute block (output + 1)

Here are the instructions.

Step 1: Add a Modbus Interface

The first step is to establish a Modbus interface between a control system and Arundo Edge.

  1. On the sidebar, select Interfaces | Add new.
  2. Select Modbus.
  3. In Name, enter the name of the control system.
  4. In Connection Type, select "TCP".
  5. In URL, enter the connection address for the control system.
  6. In Port, enter the port used for connections to the control system.
  7. Complete the remaining fields as necessary.
  8. Click Add interface.
Step 2: Add Function Calls

The next step is to add function calls for the interface.

  1. Click Add Function Call.
  2. In Name, enter "Read".
  3. In Function Type, select "Read Holding Registers".

    Tip

    This function call will collect data from the control system.

  4. Complete the remaining fields as necessary.

  5. Click Add.
  6. Click Browse in the Operation column for the function call.
  7. In Quantity, select the quantity of bits the tag value spans.
  8. Under Select address space (browse), adjust the slider control and use the Raw Hex Output matrix to locate the correct bit address.
  9. Under Viable types, select the value to use for the tag.
  10. Click Add Tag.
  11. Click Add Function Call.
  12. In Name, enter "Write".
  13. In Function Type, select "Write Holding Registers".

    Tip

    This functional call will send data back to the control system.

  14. Click Add.

  15. Click Add Tag next to the functional call you just added.
  16. In Tag ID, enter the unique identifier to use for the write tag.
  17. Complete the remaining fields as necessary.
  18. Click Add.
Step 3: Build a Compute Block

The final step is to build a compute block to calculate the value to write back to the control system.

  1. Select Compute Chain on the sidebar.
  2. Click Add Compute Block.
  3. In Name, enter a name for the compute block.
  4. In Update Criteria, select "Any Input Received".
  5. (Optional) In Description, enter a description of the output value of the compute block.
  6. In Interval, specify the interval in milliseconds at which to update the output value.
  7. Under Inputs, complete the following:

    1. In Interface field, select the Modbus interface you just added.
    2. In Tag ID field, select the tag you added for the Read Holding Register.
    3. In Expression variable name field, enter "A".
    4. Click + Add.
  8. Under Outputs, complete the following:

    1. In Interface field, select the Modbus interface you just added.
    2. In Tag ID field, select the tag you added for the Write Holding Register.
    3. In Expression variable name field, enter "B".
    4. Click + Add.
  9. In Define the expression, enter B = A + 1.

  10. Click Save.

Managing Modbus Interfaces

Complete the following to manage established Modbus interfaces.

Configuring a Modbus Interface
  1. On the sidebar, select Interfaces and select the interface.
  2. Click Advanced Parameters.
  3. Make changes as necessary.
  4. Click Save.
Updating a Function Call
  1. On the sidebar, select Interfaces and select the interface.
  2. Locate the call in the Function Calls list.
  3. Click Edit next to the call.
  4. Make changes as necessary.
  5. Click Save.
Deleting a Function Call
  1. On the sidebar, select Interfaces and select the interface.
  2. Locate the call in the Function Calls list.
  3. Click Delete next to the call.
  4. Click OK.
Updating a Tag
  1. On the sidebar, select Interfaces and select the interface.
  2. Locate the relevant call in the Function Calls list.
  3. Click + to expand the tags list.
  4. Click Edit next to the tag.
  5. Make changes as necessary.
  6. Click Save.
Deleting a Tag
  1. On the sidebar, select Interfaces and select the interface.
  2. Locate the relevant call in the Function Calls list.
  3. Click + to expand the tags list.
  4. Click Delete next to the tag.
  5. Click OK.
Disabling a Modbus Interface
  1. On the sidebar, select Interfaces and select the interface.
  2. Deselect Enabled.
  3. Click Save.
Deleting a Modbus Interface
  1. On the sidebar, select Interfaces and select the interface.
  2. Click Delete.
  3. Click Yes.