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.
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.
- On the sidebar, select Interfaces | Add new.
- Select Modbus.
- In Name, enter the name of the control system.
- In Connection Type, select "TCP".
- In URL, enter the connection address for the control system.
- In Port, enter the port used for connections to the control system.
- Complete the remaining fields as necessary.
- Click Add interface.
- Click Add Function Call.
- In Name, enter a name to describe the function call.
- In Function Type, select the function to perform.
- Complete the remaining fields as necessary.
- Click Add.
- Click Browse in the Operation column for the function call.
- In Quantity, select the quantity of bits the tag value spans.
-
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.
-
Under Viable types, select the value to use for the tag.
- Click Add Tag.
- 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.
- On the sidebar, select Interfaces | Add new.
- Select Modbus.
- In Name, enter the name of the control system.
- In Connection Type, select "TCP".
- In URL, enter the connection address for the control system.
- In Port, enter the port used for connections to the control system.
- Complete the remaining fields as necessary.
- Click Add interface.
Step 2: Add Function Calls
The next step is to add function calls for the interface.
- Click Add Function Call.
- In Name, enter "Read".
-
In Function Type, select "Read Holding Registers".
Tip
This function call will collect data from the control system.
-
Complete the remaining fields as necessary.
- Click Add.
- Click Browse in the Operation column for the function call.
- In Quantity, select the quantity of bits the tag value spans.
- Under Select address space (browse), adjust the slider control and use the Raw Hex Output matrix to locate the correct bit address.
- Under Viable types, select the value to use for the tag.
- Click Add Tag.
- Click Add Function Call.
- In Name, enter "Write".
-
In Function Type, select "Write Holding Registers".
Tip
This functional call will send data back to the control system.
-
Click Add.
- Click Add Tag next to the functional call you just added.
- In Tag ID, enter the unique identifier to use for the write tag.
- Complete the remaining fields as necessary.
- 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.
- Select Compute Chain on the sidebar.
- Click Add Compute Block.
- In Name, enter a name for the compute block.
- In Update Criteria, select "Any Input Received".
- (Optional) In Description, enter a description of the output value of the compute block.
- In Interval, specify the interval in milliseconds at which to update the output value.
-
Under Inputs, complete the following:
- In Interface field, select the Modbus interface you just added.
- In Tag ID field, select the tag you added for the Read Holding Register.
- In Expression variable name field, enter "A".
- Click + Add.
-
Under Outputs, complete the following:
- In Interface field, select the Modbus interface you just added.
- In Tag ID field, select the tag you added for the Write Holding Register.
- In Expression variable name field, enter "B".
- Click + Add.
-
In Define the expression, enter B = A + 1.
- Click Save.
Managing Modbus Interfaces¶
Configuring a Modbus Interface
- On the sidebar, select Interfaces and select the interface.
- Click Advanced Parameters.
- Make changes as necessary.
- Click Save.
Updating a Function Call
- On the sidebar, select Interfaces and select the interface.
- Locate the call in the Function Calls list.
- Click Edit next to the call.
- Make changes as necessary.
- Click Save.
Deleting a Function Call
- On the sidebar, select Interfaces and select the interface.
- Locate the call in the Function Calls list.
- Click Delete next to the call.
- Click OK.
Updating a Tag
- On the sidebar, select Interfaces and select the interface.
- Locate the relevant call in the Function Calls list.
- Click + to expand the tags list.
- Click Edit next to the tag.
- Make changes as necessary.
- Click Save.
Deleting a Tag
- On the sidebar, select Interfaces and select the interface.
- Locate the relevant call in the Function Calls list.
- Click + to expand the tags list.
- Click Delete next to the tag.
- Click OK.
Disabling a Modbus Interface
- On the sidebar, select Interfaces and select the interface.
- Deselect Enabled.
- Click Save.
Deleting a Modbus Interface
- On the sidebar, select Interfaces and select the interface.
- Click Delete.
- Click Yes.