Abstract
Red Lion Workbench can be configured to make the Modbus slave. Insert a port configuration and define the Slave ID. Add a block of I/O to define the I/O that the Modbus Master can read from or write to. Declare the variables in the global variable list. The IP addresses used to address the slave are the IP addresses defined in the tool kit configuration. The default port number used by the master is 1100. To change this port number used define a new port using the MBSLAVETCP block. Port 502 cannot be used by the Red Lion Workbench slave driver unless the Sixnet Modbus slave process is disabled.
Products
RTU Products:
ST-IPm-8460/VT-mIPm-248-D/VT-mIPm-138-D
Use Case: Configure the RTU as Modbus Slave
Required Software
Sixnet I/O Tool Kit 5.0.103
Red Lion Workbench 1.0.3
Configure the IP addresses in the Sixnet I/O Tool Kit
- Create the RTU configuration in the Sixnet I/O Tool Kit. Assign IP addresses in the configuration and load the configuration in the RTU (Operations > Load > Load Now). These are the IP addresses that are addressable by the Modbus Master and used to communicate from the Red Lion Workbench to the RTU. In this case 10.1.0.100 and 192.168.0.100 are used.
- Open the Red Lion Workbench configuration. Go to the fieldbus configuration. Right-click on the MODBUS Slave Configuration and click on “Insert Master/Port.”
- Define the Slave address. In this case 101 is used.
- Next, right-click on the Server configuration and select Insert Slave/Data Block.
- Define a block of data to read by or written to by the master.
- First define the description as a reference name.
- Next define the data type. Input bits (Discrete Inputs, BOOL) and Input Registers (Analog Inputs, INT) can only be read by the Master. Coil bits (Discrete Ouputs, BOOL) and Holding Registers (Analog Outputs, INT) can be read or written to by the master.
- Define the data block with starting address (Base Address) and the number of registers (nb).
- Optionally declare variables. Check the box add a prefix ending with a “%” symbol indicating where the sequential numbering will be added to make unique variables. A preview of the variables that will be created are below.
How to configure the Master to communicate with RTU slave block
ModbusView TCP is used to show the master configuration, but this applies to any Modbus master.
- Define the IP Address of the RTU (10.1.0.100 in this case). The default port number is 1100 (to configure another port see the section below). The slave address is the slave address configured in the above section (101 used in this case).
- Starting register should be “1.” The length requested is 100 to match the number used in the above section. Variable type matches the variable type in the above section.
How to configure another IP port number in the Modbus slave driver?
The default port is 1100. This matches the Red Lion Workbench runtime port. To change the port the MBSLAVETCP block. By default, 502 is taken by Sixnet processes, so if 502 must be used the Sixnet sxmbeth_client process must be disabled.
- In a program in the Red Lion Workbench project add the MBSLAVETCP block. Set the input to active so the block is active. Set the port input to the desired port number.
Disclaimer
It is the customer's responsibility to review the advice provided herein and its applicability to the system. Red Lion makes no representation about specific knowledge of the customer's system or the specific performance of the system. Red Lion is not responsible for any damage to equipment or connected systems. The use of this document is at your own risk. Red Lion standard product warranty applies.
Red Lion Technical Support
If you have any questions or trouble contact Red Lion Technical Support by clicking here or calling 1-877-432-9908.
For more information: http://www.redlion.net/support/policies-statements/warranty-statement