ETH-MODBUS-IO8R-A

Contents

ETH-MODBUS-IO8R-A Data Acquisition Module User Manual

Product Overview

The ETH-Modbus-IO8R-A is an Ethernet-based device that allows users to connect to and control a variety of input and output (I/O) devices using the Modbus protocol. It has eight digital inputs, eight digital outputs, six analog inputs, and two analog outputs. The device can communicate over Ethernet using the TCP or RTU (Remote Terminal Unit) protocols, and it can also be connected to other devices using the RS485 serial communication protocol.

Some possible uses for the ETH-Modbus-IO8R-A include controlling and monitoring devices in an automated production line, integrating sensors and actuators into a larger control system, and collecting data from a variety of sources for analysis or visualization. The Modbus protocol is widely used in industrial and building automation applications, and the ETH-Modbus-IO8R-A’s Ethernet connectivity allows it to be easily integrated into a variety of systems.

Product Introduction

ETH-MODBUS-IO8R-A module is a multi-function serial port server. In addition to the on-off data acquisition and control, analog data acquisition, and output channels, the RJ45 interface is added to make it work on Modbus RTU function for serial communication, by increasing the conversion of Modbus TCP protocol communication with the network interface equipment, the equipment with RS485 interface can be connected to TCP/IP network through the two-way transparent transmission between RS485 serial port and Ethernet. At the same time, 2 independent RS485 serial ports extend 1 physical communication link. More support dial code set serial port baud rate, station number, “six in one” RTU from Modbus station, and other practical functions, is economic stability, robust products.

Features

  • 8-way photoelectric isolation digital input, 8-way relay digital output (corresponding to the number of status indicators)
  • 6-way 12-bit analog input, 1-way 12-bit analog output
  • 2-way 485 interfaces, 1-way DB9 master, 1-way terminal, independent use
  • RJ45 port, 10/100 Mbps Ethernet communication
  • With baud rate, station number dial switch, easy-to-set module parameters
  • It supports Modbus TCP, Modbus RTU, and TCP protocol, and also supports 4 Modbus TCP connections
  • The system has built-in Modbus TCP to Modbus RTU, and Modbus RTU to Modbus TCP; it can be used as a TCP network server or client
  • It supports converting up to 6 Modbus RTU slave stations and this module into 1 Modbus TCP server control corresponding to the number of configuration points
  • The special upper computer can set the module parameters to be saved permanently
  • The power supply circuit adopts an anti-reverse connection design
  • It is widely used in signal acquisition and control of industrial field equipment

Application Scenarios

The ETH-MODBUS-IO8R-A module has a wide range of applications, such as PLC Control, industrial automation, building automation, POS system, power monitoring, access control medical, attendance system, self-service banking system, telecom room monitoring, information appliances, LED information display equipment, measuring instruments and environmental power monitoring system, rice selling system and other equipment or systems containing RS485 serial port.

Product specification

Product parameters

Input Interface (DI)
Number of input points8
Input signal typeSwitch contact signal or level signal
Output capacity2A
Insulation LoopOptocoupler isolation
Output Interface (DO)
Number of output points8
Output typeRelay output normally opens contacts
Contact capacity30VDC/5A 250VAC/5a
Insulation LoopMechanical insulation
Analog input (AI)
Number of input points6
Input type3-channel 0 ~ 10v; 3-channel 0 ~ 20ma
Conversion accuracy12 bits
Analog quantity output (AO)
Number of output points1
Output type0 ~ 10V or 0 ~ 20ma optional, stand-alone terminal
Conversion accuracy12 bit
Interface typeRS485, terminal
Baud rate4800 ~ 115200(configurable)
Communication formatDefault 8-bit data, 1-bit stop, no check (configurable)
Communication mode1) Modbus TCP to Modbus RTU
2) Modbus RTU:
This module is accessed by Modbus RTU main station according to the station number of this module
For the other station, the function is Modbus RTU (main station) to Modbus TCP (server)
3) TCP transmission
Address Range1 ~ 254
Transmission distance1,200 meters
COM2(RS485 communication parameter)
Interface typeRS485, DB9 Master: 3 lines (A +) , 8 lines (B -) ; 5 lines (ground)
Baud rate4800 ~ 115200(ex-factory 9600, baud rate dial switch configuration)
Communication formatDefault 8-bit data, 1-bit stop, no check (configurable)
Communication mode1) Modbus TCP to Modbus RTU
2) Modbus RTU: This module is accessed by Modbus RTU main station only
3) TCP transmission
4) Modbus RTU master station
Address Range1 ~ 254
Transmission distance1,200 meters
Network communication parameter
Interface formRJ45
Network typeLocal area network
IP address192.168.1.12(configurable)
Communication ProtocolModbus TCP, TCP/IP
Rate10/100mbps; full duplex; adaptive
Power parameter
Operating voltageDC 24V; with anti-reverse protection
Power consumption2W ~ 4W
Working Environment
Operating Temperature– 20 °C ~ + 70 °C
Storage temperature– 40 °C ~ + 85 °C
Installation modeGuide rail
Dimensions125MM (length) * 80MM (width) * 50MM (height) , whichever is the material

Terminal Wiring

COM2 Port (DB9 female header) pin definition

1NC
2GND
3A
4NC
5GND
6NC
7NC
8B
9NC

Input signal description

The input signal supports positive/high adversative/low access.
When the input is positive/high, the common terminal is connected to the negative pole of the power supply, and the input terminal is connected to the corresponding input signal.
When the input is negative or active low, the common terminal is connected to the positive pole of the power supply, and the input terminal is connected to the corresponding input signal.

Port and register address description

Correspondence table of TCP link port function of ETH-MODBUS-IO8R-A

IP port numberSupport functionMaximum number of connectionsDetailed description
5021、MODBUS TCP function
2、MODBUS TCP to MODBUS RTU function (corresponding to COM1 at this time)
21) When MODBUS TCP message address = module address, it corresponds to MODBUS TCP function.
2) When the MODBUS TCP message address=(2~254) does not conflict with the module address, it corresponds to the MODBUS TCP to MODBUS RTU function.
3) The port supports three types of connection methods when connected in two ways:
A. Two channels correspond to MODBUS TCP function or MODBUS TCP to MODBUS RTU function at the same time
B. 1-way link corresponds to MODBUS TCP, and the 1-way link is to MODBUS TCP to MODBUS RTU function (specifically determined by the station number of the slave station in the message).
95021、MODBUS TCP function
2、MODBUS TCP to MODBUS RTU function (this corresponds to COM2)
3、TCP pass-through function (this time corresponds to COM2)
11) When MODBUS TCP message address = module address, it corresponds to MODBUS TCP function.
2) When the MODBUS TCP message address=(2~254) and there is no conflict with the module address, the corresponding COM2 port MODBUS TCP to MODBUS RTU function.
3) When configuring serial port 2 as the transparent transmission function, the TCP connection of this port realizes transparent transmission of TCP data to COM2
95031、MODBUS TCP function
2、MODBUS TCP to MODBUS RTU function (this corresponds to COM2)
3、TCP pass-through function (this time corresponds to COM1)
11) When MODBUS TCP message address = module address, it corresponds to MODBUS TCP function.
2) When the MODBUS TCP message address=(2~254) and there is no conflict with the module address, the corresponding COM2 port MODBUS TCP to MODBUS RTU function.
3) When configuring serial port 1 as the transparent transmission function, the TCP connection of this port realizes the transparent transmission of TCP data to COM1.
55021、MODBUS TCP Control Multi-Slave11) When the COM2 port mode is “MODBUS master”, up to 6 MODBUS RTU slaves and this module can be converted into 1 MODBUS TCP server control corresponding to the IO, hold/input register points configured on their web pages.

ETH-MODBUS-IO8R-A Serial Port Function Correspondence Table

Serial port function description

PortSupport FunctionMaximum number of connectionsDetailed Description
COM11、MODBUS TCP to MODBUS RTU function
2.
1) MODBUS RTU function
2) MODBUS RTU to MODBUS TCP function
3、TCP pass-through
2When the host computer configures COM1 for TCP to RTU function, COM1 can be connected to other MODBUS RTU slave stations; realize Ethernet control of other MODBUS RTU slave modules (corresponding to port 502 of TCP connection).
When the host computer configures COM1 for RTU function:
1) When the received station number is the same as this module, other MODBUS RTU masters can access this device via MODBUS RTU protocol.
2) When the received station number does not correspond to this module, other MODBUS RTU masters can access the MODBUS TCP server device via this module.
When COM1 is configured for the pass-through function, COM1 achieves data pass-through with the TCP connection on port 9503 (corresponding to port 9503 of the TCP connection).
COM21、MODBUS TCP to MODBUS RTU function
2、MODBUS RTU function
3、TCP pass-through
4、MODBUS TCP control multiple slave stations
11、When the host computer configures COM2 for TCP to RTU function, COM2 can be connected to other MODBUS RTU slaves; to achieve Ethernet control of other MODBUS RTU slave modules (corresponding to TCP connection of port 9502/9503).
2、When the host computer configures COM2 for RTU function, other MODBUS RTU masters can access the device via MODBUS RTU protocol.
3、When COM2 is configured for the pass-through function, the TCP connection between COM2 and port 9502 is used for data pass-through (corresponding to the TCP connection of port 9502).
When configuring the MODBUS master function, COM2 can convert up to 6 MODBUS RTU slaves with this module to 1 MODBUS TCP server control corresponding to the number of IO and holding/input register points configured in their web pages via port 5502. (corresponds to TCP connection port 5502)

Serial port and port number function correspondence

PortMODBUS RTU SlaveMODBUS master to MODBUS TCPMODBUS TCP to MODBUS RTUMODBUS RTU to Modbus TCPTCP to serial port pass-through
COM1SupportNot supported502Support (web setting)9503
COM2Support5502 Port9502、9503Not supported9502

Port data buffer length description

PortTCP Transparent TransmissionTCP Transparent TransmissionMODBUS protocolMODBUS protocolMaster functions
Receive data Maximum allowable lengthReceive data Maximum allowable lengthReceive data Maximum allowable lengthReceive data Maximum allowable lengthNumber of slave stations
COM1512512240240
COM25125122402406
TCP512512512512

Digital input and output addresses

NamePLC Corresponding addressMODBUS Corresponding addressSupport Function Code
Input Channel 1100010x000x02
Input Channel 2100020x010x02
Input Channel 3100030x020x02
Input Channel 4100040x030x02
Input Channel 5100050x040x02
Input Channel 6100060x050x02
Input Channel 7100070x060x02
Input Channel 8100080x070x02
Output channel 1000010x000x01 0x05 0x0F
Output channel 2000020x010x01 0x05 0x0F
Output channel 3000030x020x01 0x05 0x0F
Output channel 4000040x030x01 0x05 0x0F
Output channel 5000050x040x01 0x05 0x0F
Output channel 6000060x050x01 0x05 0x0F
Output channel 7000070x060x01 0x05 0x0F
Output channel 8000080x070x01 0x05 0x0F

Input register address

NamePLC MODBUS Corresponding addressMODBUS Corresponding addressSupport Function Code
Analog input channels 1(V1)300010x000x04
Analog input channels 2(V2)300020x010x04
Analog input channels 3(V3)300030x020x04
Analog input channels 4(I1)300040x030x04
Analog input channels 5(I2)300050x040x04
Analog input channels 6(I3)300060x050x04

Holding register address

NamePLC Corresponding addressMODBUS Corresponding address(bit)Default value (decimal)Support Function Code
Reserved40001~400060x00~0x050x03
Analog output400070x0600x03 0x06
Reserved400080x070x03

System parameters (modified by the host computer)

NameMODBUS Corresponding address(bit)Default value (decimal)
Reserved0x00100
Reserved0x011
Local address configuration0x021
COM1 Communication parameter configuration0x039600,1,8,NONE
Frame end time0x040
Discrete input display mode Switching0x050
Reserved0x060
Reserved0x070
Bus mode0x08401
Local IP Segment 10x09192.168
Local IP segment 20x0A1.12
Local MAC10x0B255.255
Local MAC20x0C255.255
Local MAC30x0D255.255
COM2 communication parameters0x0E9600,1,8,NONE
Configuration of each serial port mode0X100
Note: The module should be powered off and restarted after modifying the holding register parameters.

Product Features

MODBUS TCP function

The MODBUS TCP function is accessed when the MODBUS TCP message address is the module address, i.e. MODBUS TCP function

CategoryParameter detailsDescription
TCP server IP192.168.1.12This IP is the default value, refer to section 5.2.2 or 5.3.2 to set other IPs
TCP server port502、9502、9503Fixed port
Module Address1~126Factory module station number 1, settable range 1~126, refer to section 5.2.3

MODBUS TCP to MODBUS RTU function

Directly converts MODBUS TCP requests into MODBUS RTU requests and sends them to the slave via RS485 port; then converts the corresponding slave reply data into MODBUS TCP messages and sends them to the host computer, see the following table for the relevant parameters.

CategoryParameter detailsDescription
COM1COM2
TCP server IP192.168.1.12192.168.1.12This IP is the default value, refer to section 5.2.2 or 5.3.2 to set other IP
TCP server port5029502、9503TCP server port 502 9502, 9503 fixed port, where port 502 can support up to 2 uplinks
Serial port modeTCP 转 RTUTCP 转 RTUSerial port mode TCP to RTU TCP to RTU factory default mode can be set via section 4.7 or section 5.2.5
MODBUS RTU slave address2~2542~254The MODBUS slave address connected to the RS485 port of the unit must be in the range 2~254 and not conflict with the module address
RS485 serial port parametersDefault parameters: Baud rate: 9600, 8 bits data without parity, 1 bit stop bitDefault parameter: Baud rate:9600, 8 bits data without parity, 1 bit stop bitRefer to Section 5.2.4 or 5.3.4 to set other serial port parameters

MODBUS RTU to MODBUS TCP function

COM1 port of this module supports the conversion of MODBUS RTU messages to MODBUS TCP messages; it enables data conversion between the MODBUS RTU master and the MDOBUC TCP server. When the COM1 port is in “RTU” mode, the module automatically starts the MODBUS TCP client function and automatically connects to the remote MODBUS TCP server set up via the web page. The relevant parameters are described in the following table:

CategoryParameterDetails
COM1
Remote Server IP192.168.1.124The IP and port are the factory default parameters, refer to Section 5.3.3 to set other remote server IPs and ports.
Remote server port8080The IP and port are the factory default parameters, refer to Section 5.3.3 to set other remote server IPs and ports.
Serial Port ModeRTURefer to section 5.2.5 to set the serial port mode to RTU
RS485 serial port parametersDefault parameters: Baud rate: 9600, 8 bits data without parity, 1 bit stop bitRefer to Section 5.2.4 Setting Other Serial Port Parameters

MODBUS RTU Functionality

Both COM1 and COM2 ports of this module support the MODBUS RTU function. When the COM1 or COM2 port is in “RTU” mode, the module can be used as a MODBUS RTU slave device. The relevant parameters are described in the following table:

CategoryParameter detailsDescription
MODBUS RTU Slave Address1~1261) The station number of this module can be set in section 5.2.3
2) When the COM1 port receives the same station number as this module, it will be treated as a MODBUS RTU message; otherwise, the MODBUS RTU message will be converted to MODBUS TCP, i.e. the function described in section 4.3.
Serial modeRTURefer to Section 5.2.5 to set the serial port mode to RTU.
RS485 serial port parametersDefault parameters: Baud rate: 9600, 8 bits data without parity, 1 bit stop bitRefer to Section 5.2.4 Setting Other Serial Port Parameters

MODBUS TCP Control Multi-Slave

Function description

The COM2 port of this module supports the MODBUS RTU master function, this function is used to convert up to 6 MODBUS RTU slaves connected to the COM2 port and the number of IO points of this module into 1 MODBUS TCP server, which can be used for reading and writing of all slaves through 1 MODBUS TCP connection.

The module register address is the first (if the module address is 2-7 and the RTU station number “conflicts” remains first), and the rest of the registers of lower stations are first.

CategoryParameter detailsDescription
Serial port numberCOM2
TCP server IP192.168.1.12This IP is the default, refer to section 5.2.2 or 5.3.2 to set another IP
TCP server port5502Fixed port
Module Address1~126Factory module station number 1, settable range 1~126, refer to section 5.2.3
Remaining MODBUS RTU slave addresses2~7Remaining MODBUS RTU slave addresses
2~7
Maximum number of MODBUS RTU slave stations6This module is a MODBUS TCP server
Serial modeMODBUS MasterRefer to the section “5.3.4 – Turning on the master mode” for setting
COM2 serial port parametersDefault parameters: Baud rate: 9600, 8 bits data without parity, 1 bit stop bitCOM2 serial parameters should be modified according to section 5.2.4, all slave serial parameters should be the same

4.5.2 Function configuration

After setting COM2 mode to MODBUS RTU master (refer to section “5.3.4 – Enabling master mode”) and configuring the corresponding slave points on the web page (refer to section 5.3.4 – MODBUS TCP control multi-slave communication configuration), the module’s COM2 will automatically start MODBUS RTU master timed scan.

Functional testing

After connecting the MODBUS RTU slave with the same serial parameters to the COM2 port of the module, you can use the special test tool “AMX_ModbusTCP Test Tool” (version V1.0) provided by Amoxun for this function and perform the test in the following steps:

A. Fill in the module address, the factory default IP of this module is 192.168.1.12
B. Fill in the port number 5502 (default, other functions can be changed when connecting)
C. Fill in the number of digital outputs, digital inputs, read-only registers, and holding registers (according to the total number of 6 RTU slaves configured on the module IP page, refer to section 5.3.4 – MODBUS TCP control multi-slave communication configuration)
D. Fill in the module address (1~126), the factory address of the module is 1
E. Click the Set button
F. Click on the button to start the 2nd MODBUS TCP (the color of the button changes to red after connection)
G. Check the status values of 4 fields: digital input, coil, input register, and holding register, whether they correspond to the slave station

Note:
Selecting the first MODBUS TCP connection for testing is also possible, but note that the port number should be changed to 5502
When both MODBUS TCP connections are set, the number will be added up, and the address of the second connection will be first.
The holding register of this module does not support reading or writing on port 5502

TCP to RS485 pass-through function

The COM1 and COM2 ports of this module both support TCP pass-through function. When the COM1 or COM2 port is in “TCP pass-through” mode, the TCP client data will be sent to the RS485 device connected to the module as is. The relevant parameters are described in the following table:

CategoryParameter DetailsDescription
COM1COM2
TCP server IP192.168.1.12192.168.1.12This IP is the default value, refer to section 5.2.2 or 5.3.2 to set other IPs
TCP server port95039502Fixed
Serial port modeTCP pass-throughTCP pass-throughRefer to Section 5.2.5 Setting the serial port mode to TCP pass-through
RS485 serial port parametersDefault parameters: Baud rate: 9600, 8 bits data without parity, 1 bit stop bitDefault parameter: Baud rate:9600, 8 bits data without parity, 1 bit stop bitRefer to Section 5.2.4 Setting Other Serial Port Parameters

Restore factory setting function by button

When the module is powered on and the RUN light is flashing, press and hold the reset button (about 5S) until the RUN light becomes normal, and then release the button, the RUN light will be on for 5S and then resume flashing, then power off the module for at least 3S and power on, the module will restore the factory parameters, as shown in the table below.

Parameter NameParameter Default Value
The IP address of the module192.168.1.12
Module AddressFactory 1, DIP2 dipswitch corresponds to station numbers 1~32, refer to section 5.2.3
Serial communication parametersBaud rate 9600, 8 bits of data, 1 bit of stop bit, no parity;
The COM2 port baud rate is 9600 at the factory, and the DIP1 dipswitch corresponds to the baud rate after use, refer to Section 6.2.4-COM2 baud rate setting.
Serial port modeCOM1 and COM2 serial modes are MODBUS TCP to MODBUS RTU
Bus error modeThe mode is bus error reset, and the time threshold for determining bus error is 2s
Remote server IPaddress:192.168.1.124, port:8080
MODBUS TCP control Multi-slave communication configurationThe number of coil components, discrete components, read-only registers, and read-write registers of “Station 1~Station 6” on the module IP page is 0

Parameter configuration

This section describes the configuration of the ETH-MODBUS-IO8R-A parameters, which can be configured by the user with the Amoxun MODBUS debugging tool (sometimes in combination with DIP dip switches) or the module’s IP web page, to achieve the corresponding functional requirements.

Pre-configuration

Connect the module and computer with 10/100Mbps cable, connect the DC 24V external power supply to the module, and power it on, check whether the positive and negative poles of the power supply are connected correctly before powering it on, and check whether the IP of the computer and the module are in the same LAN segment by pinging the IP address of the computer and the module if the ping is through, it can be used normally, if not, it can be handled as follows:

Case 1: First-time use, the module has not changed the IP

A. When you use the module for the first time, the module IP is the default address: 192.168.1.12, open the computer network connection, and check whether the IP of the local network cable corresponding to the module is in the same network segment with the module IP, if yes, please check whether the network cable is suitable, if not in the same network segment, please refer to the next step B to deal with it;

Case 1: First-time use, the module has not changed the IP

A. When you use the module for the first time, the module IP is the default address: 192.168.1.12, open the computer network connection, and check whether the IP of the local network cable corresponding to the module is in the same network segment with the module IP, if yes, please check whether the network cable is suitable, if not in the same network segment, please refer to the next step B to deal with it;

B. Refer to the following steps, and set the network cable connecting the module to the computer to a fixed IP in the same network segment as the module.

Case 2: The IP of the module has been changed:

A. If the user remembers the module IP, please refer to operation B in case 1 and set the computer IP to be on the same network segment as the module;
B. If you forget the module IP, reset the module IP according to section 4.7, and then refer to case 1.

Configuration with “MODBUS debugging tool

Debugging tool connection

To use the MODBUS debugging tool (version V3.0) (configuration or debugging functions) like any other host computer, you need to establish communication between the host computer and the module, please follow the steps below to connect the configuration tool:

A. Open the configuration tool and select “MODBUS TCP+” in the “Interface Type” field.
B. Select the corresponding product category (host model), the host is I8-Q8-AI6-AO1
C. Fill in the module address (1~126), the factory address of this module is 1
D. Fill in the IP address of the module, the default IP of the module is 192.168.1.12
E. Fill in the port number 502 (connection 9502, 9503 port can not be used to configure the module parameters)
F. Click the Start Scan button, after a successful connection, the button text will change to Stop Scan and the color of the communication status icon on the right will change from black to red.

Modify the local IP

After filling in the required IP address of the module in the “Ethernet Setting” area, click the “Set” button at the same horizontal line, the RUN light will be on for 5S and then resume blinking, then power up the module after disconnecting it for at least 3S, the new IP setting will take effect.

Note: Modifying the port number of the module is not supported.

Modify local address

Set the station number from 1 to 32

To modify the station number in the range of 1~32, you must adjust the status of the “Station Address” dip switch on the module, and note that when adjusting the dip switch status when the module is powered on, the module must be powered off for at least 3S and then powered on again to take effect. The following table shows the corresponding relationship (all dip codes are OFF at the factory).

Setting 33~126 station numbers

The highest station number that can be set for this module is 126. When all states of the “Station Address” dipswitch are ON (i.e., the station number of the module is 32 before setting), you can set the station number between 33 and 126 for the module through the debugging tool. As shown in the figure below, after filling in the module address in the “Configure Slave Address” area, click the “Set” button at the same horizontal line on the right, and then power up the module after powering it off for at least 3S, the newly set module address will take effect.

Modify COM port parameters

COM port communication parameters description

Serial port numberBaud RateData bitsStop bitsChecksum bit
COM14800~115200 Only support upper computer setting8 or 7 bits (Only TCP transmission can set 7 bits)1/1.5/2None/Odd/Even (None is supported for 7 bits of data)
COM24800~115200 Only the dipswitch setting is supported8 or 7 bits (Only TCP transmission can set 7 bits)1/1.5/2None/Odd/Even (None is not supported for 7 bits of data)

COM2 baud rate setting

The COM2 baud rate is determined by the “baud rate” dip switch on the module, note that when the module is powered on to adjust the dip switch status, the module must be powered off for at least 3 seconds and then powered on again to take effect. The specific relationship can be seen in the following table (all dialing codes are OFF at the factory).

COM port parameter setting instructions (except COM2 baud rate)

As shown in the figure below, in the “Ethernet to 485 configurations” area, select the communication parameters of the corresponding serial port from the drop-down list (serial port 1 is COM1 port, serial port 2 is COM2 port), click the “Set” button at the same vertical line position on the right, the RUN light will be on for 5S and then resume blinking, then power up the module after powering it off for at least 3S, and the newly set serial port parameters will take effect.

Note:
The setting of data bit 7 requires the serial port mode to be TCP pass-through (see section 5.2.5 for serial port mode setting).
When setting data bit 7, the parity bit does not support parity (None).

Modify the serial port mode

As shown in the figure below, in the “Serial port mode setting” area, after selecting the corresponding serial port mode from the drop-down list (serial port 1 is COM1 port, serial port 2 is COM2 port), click on the “Set” button at the same horizontal line below, the RUN light will be on for 5S and then resume blinking, then power up the module after disconnecting it for at least 3S, the newly set serial port mode will take effect.

Note: For MODBUS master mode, serial port 1 is not supported at the moment, serial port 2 needs to be set on the web page.

Modify bus error mode

The bus error determination function is used to determine whether all output coils of the module will remain in the state or be reset to the coil off state after a bus error occurs in the communication connection to the module.

The module supports four ports of MODBUS TCP client 502, 9502, 9503, and 5502 and two MODBUS RTU masters of COM1 and COM2 interfaces connected to the module.

The user can set the bus error mode (reset or hold) and bus error determination time (threshold) with the “Amoxun MODBUS debugging tool”. As shown in the figure below, in the “Mode configuration” area, you can check the box for bus error reset or bus error hold according to your needs, and fill in the value of the bus error determination time threshold (in 10ms) (i.e. the time when there is no connection between the MODBUS TCP client or MODBUS RTU master and the module exceeds this value). Click on the “Set” button, the RUN lamp will be on for 5S and then it will blink again, then the module will be powered off for at least 3S and then it will be powered on, and the newly set bus error mode and determination time will take effect.

Note:
When the factory or key reset, the mode is bus error reset, and the bus error judgment time threshold is 2s
The bus error judgment time threshold is set in the range of 2s~327.67s, and the default is 2ms if the value is out of range.
The bus error judgment time is the duration, i.e. when the module is connected again within the no connection time, the judgment time will be counted from zero seconds after the next no connection time.

Since the MODBUS configuration tool has just started scanning within 6 seconds, it is at a faster frequency to get the current parameters of the module. If the user selects the parameters to be set at this time and does not click the corresponding setting button as soon as possible, restoring the parameters before setting is easy, resulting in the need to repeat the operation.
If you need to set more than one parameter before the module power off, you should set the next parameter after the RUN light resumes flashing.
The above operations (except for the operation of input \ export) are all supported to power-down save, do not operate frequently to avoid damaging the module and causing abnormal work.

Web page configuration

Login module IP web page

Open the browser and enter the IP of the module (the default IP is 192.168.1.12), enter the login page, fill in the login account and login password “amx666”, and click the login button to enter the parameter page of the module, as shown below.

Note: The current parameters of the module are read-only after clicking the Login button.

Module IP Setting

As shown in the figure below, in the “IP Address” area of the parameter page, fill in the required IP address, and then click the Save and Reboot button until the web page cannot be displayed, then power up the module after powering it off for at least 3S. The newly set module IP address will take effect.

Note: If you click Save and Reboot several times to set the IP address invalid, please check whether the physical memory of the computer is sufficient.

Remote server IP settings

When the COM1 port serial function is MODBUS RTU to MODBUS TCP, the module IP page should set the relevant remote server parameters page.

As shown in the figure below, fill in the required remote server IP address and port number in the “Remote Server IP Address” area of the parameter page, then click the Save and Restart button until the web page cannot be displayed, then power up the module after at least 3S power off, and the newly set remote server IP address and port number will take effect.

Note: The IP address of the remote server should be in the same network segment as the module IP.

COM2 port parameter setting

COM port serial port parameters (except baud rate)

As shown in the figure below, in the “Serial Port Parameters” area of the parameter page, select the corresponding COM2 port communication parameters from the drop-down list, and then click the “OK” button at the same horizontal line position, or click the Save and Restart button until the web page cannot be displayed, then power on the module after powering it off for at least 3S. The newly set COM2 serial port parameters will take effect.

Note:
When setting data bit 7, the serial port mode must be TCP pass-through (see section 5.2.5 or the next section “Enabling Master Function” for the serial port mode setting).
When data bit 7 is set, the parity does not support parity (None).

Turn on the master function

As shown in the figure below, in the “Enable Master Function” area of the parameter page, you can select the serial port mode corresponding to the COM2 port from the drop-down list, and then click the Save and Restart button until the web page cannot be displayed, then power up the module after at least 3S power off, and the newly set COM2 serial port mode take effect.

Note: Other serial modes for the COM2 port can also be set by selecting them from the drop-down list here

MODBUS TCP control multi-slave communication configuration

As shown in the figure below, in the “Station 2~7” area of the parameter page, fill in the corresponding station number “Coil element, Discrete element, Read-only register, Read-write register”.

Then click on the bottom-right corner to confirm, or click on the Save and restart button until the web page is not displayed, then power the module off for at least 3S and power it on, and the newly set MODBUS TCP-controlled multi-slave communication configuration will take effect.

Note: To MODBUS TCP control multiple slaves available, you also need to set COM2 port mode to RTU master.

Note: The above operations (except for the operation of the output/entry) are supported by power-down saving, and do not operate frequently to avoid damaging the module and causing abnormal work.

MODBUS TCP message format description

Digital input signal acquisition command

Protocol description

Function code:0x02
The command is used to read out the current discrete input register status; the local discrete input register 0x00-0x07 corresponds to input channels 1-8, when the input port status is invalid, the indicator goes off and returns to 0; when it is valid, the indicator lights up and returns to 1.

Read discrete input request message format description

Serial numberMessage fieldLength (bytes)Bytes Storage methoddescription
1Transaction knowledge2High bytes in frontUsually the message sequence number
2Protocol identifier2High bytes in frontGenerally, the default is 00 00
3Message length2High bytes in frontRemove the transaction identification, protocol identification, and data byte length of the message length
4Unit identification1Range 0x01~0xFE; the factory default value is 1, and the rest are used for the slave station number of the RS485 port
5Function Code10x02Related function codes of MODBUS communication protocol
6Start address2High bytes in frontRead the input discrete value from this registered address
7Number of registers2High bytes in front

Read discrete input answer message format description

Serial numberMessage fieldLength (bytes)Bytes Storage methodDescription
1Transaction knowledge2High bytes in frontGenerally, it is the sequence number of the message, which is the same as the request message
2Protocol identifier2High bytes in frontGenerally, the default is 00 00
3Message length2High bytes in frontRemove the transaction identification, protocol identification, and data byte length of the message length
4Unit identification1Range 0x01~0xFE; the factory default value is 1, and the rest are used for the slave station number of the RS485 port
5Function Code10x02Related function codes of MODBUS communication protocol
6Data length1Suppose the data length is N, unit: byte
7DataNlow byte firstThe station number of the machine corresponds to 8-bit discrete input, and the data from low to high corresponds to discrete input 1~8 channels, and the high bit of each byte comes first

Example message description

Read the status of input channel 1~8 of this machine, in the example, input channels 2 and 8 are valid.

Request message:00 06 00 00 00 06 01 02 00 00 00 08
Answer message:00 06 00 00 00 04 01 02 01 82

Read the status of input channels 1~16 of slave 2, in the example, input channels 4, 6, 9, and 15 of slave 2 are valid.

Request message:00 06 00 00 00 06 02 02 00 00 00 10
Answer message 00 06 00 00 00 05 02 02 02 02 28 41

Digital output signal acquisition command

Protocol Description

Function code:0x01

The command is used to read out the current coil register status; the local coil register 0x00-0x07 corresponds to digital output channels 1-8, when the output port status is invalid, the indicator goes off and returns to 0; when it is valid, the indicator lights up and returns to 1.

The request message format for reading the coil output status

Serial numberMessage fieldLength (bytes)Bytes Storage methoddescription
1Transaction knowledge2High bytes in frontUsually the message sequence number
2Protocol identifier2High bytes in frontGenerally, the default is 00 00
3Message length2High bytes in frontRemove the transaction identification, protocol identification, and data byte length of the message length
4Unit identification1Range 0x01~0xFE; the factory default value is 1, and the rest are used for the slave station number of the RS485 port
5Function Code10x01Related function codes of MODBUS communication protocol
6Start address2High bytes in front
7Number of registers2High bytes in front

Read coil output answer message format description

Serial numberMessage fieldLength (bytes)Bytes Storage methodDescription
1Transaction knowledge2High bytes in frontGenerally, it is the sequence number of the message, which is the same as the request message
2Protocol identifier2High bytes in frontGenerally, the default is 00 00
3Message length2High bytes in frontRemove the transaction identification, protocol identification, and data byte length of the message length
4单元标识1Range 0x01~0xFE; the factory default value is 1, and the rest are used for the slave station number of the RS485 port
5Function Code10x01Related function codes of MODBUS communication protocol
6Data length1If the data length is N bytes, then the data length value is N
7Data1low byte firstThe station number of the machine corresponds to 8-bit coil output, and the data from low to high corresponds to discrete input 1 8 channels, and the high bit of each byte comes first

Example message description

Read the coil status of channel 1~8 of this machine, in the example, coil channels 2 and 8 are valid.

Request message:00 01 00 00 00 06 01 01 00 00 00 08
Answer message: 00 01 00 00 00 04 01 01 01 01 82

Read the output coil status of channels 1~16 of slave 2, in the example, output channels 1, 7, 10, and 16 of slave 2 are valid.

Request message:00 01 00 00 00 06 02 01 00 00 00 10
Answer message:00 01 00 00 00 05 02 01 02 02 41 82

Individual control commands for digital output signals

Protocol Description

Function code:0x05

The command is used to control the status of a single coil register; the local coil register 0x00-0x07 corresponds to digital output channels 1-8, when the output port status is invalid, the indicator goes off and returns to 0; when it is valid, the indicator lights up and returns to 1.

The request message format for writing a single discrete output

Serial numberMessage fieldLength (bytes)Bytes Storage methodDescription
1Transaction knowledge2High bytes in frontUsually the message sequence number
2Protocol identifier2High bytes in frontGenerally, the default is 00 00
3Message length2High bytes in frontRemove the transaction identification, protocol identification, and data byte length of the message length
4Unit identification1Range 0x01~0xFE; the factory default value is 1, and the rest are used for the slave station number of the RS485 port
5Function Code10x05Related function codes of MODBUS communication protocol
6Write Address2High bytes in front
7Write Value2High bytes in frontWrite 0XFF00 to enable output; write 0X0000 to stop output;

Description of the answer message format for writing a single discrete output

Serial numberMessage fieldLength (bytes)Bytes Storage methodDescription
1Transaction knowledge2High bytes in frontGenerally, it is the sequence number of the message, which is the same as the request message
2Protocol identifier2High bytes in frontGenerally, the default is 00 00
3Message length2High bytes in frontRemove the transaction identification, protocol identification, and data byte length of the message length
4Unit identification1Range 0x01~0xFE; the factory default value is 1, and the rest are used for the slave station number of the RS485 port
5Function Code10x05Related function codes of MODBUS communication protocol
6Write Address2High bytes in front
7Write Value2High bytes in frontWrite 0XFF00 to enable output; write 0X0000 to stop output;

Example message description Enables the output of local channel 1

Request message:31 A6 00 00 00 06 01 05 00 00 FF 00
Answer message:31 A6 00 00 00 06 01 05 00 00 FF 00

Stop the output of local channel 1

Request message:31 A6 00 00 00 06 01 05 00 00 00 00
Answer message:31 A6 00 00 00 06 01 05 00 00 00 00

Multiple control commands for digital output signals

Protocol Description

Function code:0x0F

The command is used to control the state of multiple coil registers; the local coil registers 0x00-0x07 correspond to digital output channels 1-8, when the output port state is invalid, the indicator goes off and returns to 0; when valid, the indicator lights up and returns to 1

Write multiple discrete outputs request message format description

Serial numberMessage fieldLength (bytes)Bytes Storage methodDescription
1Transaction knowledge2High bytes in frontUsually the message sequence number
2Protocol identifier2High bytes in frontGenerally, the default is 00 00
3Message length2High bytes in frontRemove the transaction identification, protocol identification, and data byte length of the message length
4Unit identification1Range 0x01~0xFE; the factory default value is 1, and the rest are used for the slave station number of the RS485 port
5Function Code10x0FRelated function codes of MODBUS communication protocol
6Start address2High bytes in front
7Write Address2High bytes in front
8Write data Number of bytes1Suppose the value of the number of data bytes written is N
9Write dataNlow byte firstEach byte high bit first

Write multiple discrete output answer message format description

Serial numberMessage field长度 (字节)Bytes Storage methodDescription
1Transaction knowledge2High bytes in frontUsually the message sequence number
2Protocol identifier2High bytes in frontGenerally, the default is 00 00
3Message length2High bytes in frontRemove the transaction identification, protocol identification, and data byte length of the message length
4Unit identification1Range 0x01~0xFE; the factory default value is 1, and the rest are used for the slave station number of the RS485 port
5Function Code10x0FRelated function codes of MODBUS communication protocol
6Start address2High bytes in front
7Write length2High bytes in front

Example message description

Control the output coil status of channels 1~8 of the local machine, in the example, the output channels 1, 3, 6, and 8 are active.

Request message:31 A6 00 00 00 00 08 01 0F 00 00 00 08 01 A5
Answer message:31 A6 00 00 00 06 01 0F 00 00 00 08

Control the status of 13 output coils of channels 3~15 of slave 254, in this example, the output channels 3, 9, 13, and 15 are active

Request message:31 A6 00 00 00 09 FE 0F 00 02 00 0D 02 41 14
Answer message 31 A6 00 00 00 06 FE 0F 00 02 00 0D

Input register readout command

Protocol Description

Function code:0x04

The command is used to read the current input register value; the local input register 0x00-0x05 corresponds to analog input channel 1-6, the value range is 0-4095, the voltage input channel range is 0-10V, the current input channel range is 0-20mA, that is, when voltage input 10V or current input 20mA, the corresponding analog access channel is read into 0x0FFF.

Serial numberMessage fieldLength (bytes)Bytes Storage methodDescription
1Transaction knowledge2High bytes in frontUsually the message sequence number
2Protocol identifier2High bytes in frontGenerally, the default is 00 00
3Message length2High bytes in frontRemove the transaction identification, protocol identification, and data byte length of the message length
4Unit identification1Range 0x01~0xFE; the factory default value is 1, and the rest are used for the slave station number of the RS485 port
5Function Code10x04Related function codes of MODBUS communication protocol
6Start address2High bytes in front
7Number of registers2High bytes in front

Read input register answer message format description

Serial numberMessage fieldLength (bytes)Bytes Storage methodDescription
1Transaction knowledge2High bytes in frontGenerally, it is the sequence number of the message, which is the same as the request message
2Protocol identifier2High bytes in frontGenerally, the default is 00 00
3Message length2High bytes in frontRemove the transaction identification, protocol identification, and data byte length of the message length
4Unit identification1Range 0x01~0xFE; the factory default value is 1, and the rest are used for the slave station number of the RS485 port
5Function Code10x04Related function codes of MODBUS communication protocol
6Data length1Suppose the data length is N
7DataNlow word firstWhen the station number of this machine is that the low channel of the analog input is in the front; the data of each register occupies the length of one word

Example message description
Read the value of channels 1-6 of the local input register, in the example, channels 1 and 4 input voltage 10V and current 20ma respectively.

Request message:00 04 00 00 00 06 01 04 00 00 00 06
Answer message: 00 04 00 00 00 0F 01 04 0C 0F FF 00 00 00 00 00 0F FF 00 00 00 00

Read the value of input registers 30001~30006 of slave 2, the values of 30001 and 30006 in the example are 0x7531 and 0x7536.

Request message:00 04 00 00 00 06 02 04 00 00 00 06

Answer message:00 04 00 00 00 00 0F 02 04 0C 75 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 75 36

Holding register readout command

Protocol Description

Function code:0x03

The command reads the current holding register value; the local user valid holding register 0x06 corresponds to the analog output channel, the value range is 0-4095, the voltage output channel range is 0-10V, and the current output channel range is 0-20mA.

When the value 4095 is read in the holding register 0x06, the voltage output channel outputs, 10V and the current output channel outputs 20ma.

The format of the request message for reading the holding register

Serial numberMessage fieldLength (bytes)Bytes Storage methodDescription
1Transaction knowledge2High bytes in frontUsually the message sequence number
2Protocol identifier2High bytes in frontGenerally, the default is 00 00
3Message length2High bytes in frontRemove the transaction identification, protocol identification, and data byte length of the message length
4Unit identification1Range 0x01~0xFE; the factory default value is 1, and the rest are used for the slave station number of the RS485 port
5Function Code10x03Related function codes of MODBUS communication protocol
6Start address2High bytes in front
7Number of registers2High bytes in frontWhen the station number of the machine is 7, the number of registers is 7, and the current value of the analog output channel can be read

Description of the reply message format for reading the holding register

Serial numberMessage fieldLength (bytes)Bytes Storage methodDescription
1Transaction knowledge2High bytes in frontGenerally, it is the sequence number of the message, which is the same as the request message
2Protocol identifier2High bytes in frontGenerally, the default is 00 00
3Message length2High bytes in frontRemove the transaction identification, protocol identification, and data byte length of the message length
4Unit identification1Range 0x01~0xFE; the factory default value is 1, and the rest are used for the slave station number of the RS485 port
5Function Code10x03Related function codes of MODBUS communication protocol
6Data length1Suppose the data length is N, unit: byte
7DataNLow bytes in frontEach register data occupies the 1-word length

Example Message Description
Read the value of channel 40001~40006 of slave 127, in the example, the value of channel 40001 and 40006 are 0x9C41 and 0x9C46.

Request message:00 17 00 00 00 06 7F 03 00 00 00 00 06
answer message: 00 17 00 00 00 0F 7F 03 0C 9C 41 00 00 00 00 00 00 00 00 00 00 00 00 9C 46

Write Single Holding Register Command

Protocol Description

Function code:0x06

The command is used to write a single holding register value; the local user can use the holding register 0x06 to correspond to the analog output channel, the value range is 0-4095, the voltage output channel range is 0-10V, the current output channel range is 0-20mA when the holding register 0x06 is written to value 4095, the voltage output channel outputs 10V, the current output channel outputs 20ma.

The format of the request message for writing a single holding register

Serial numberMessage fieldLength (bytes)Bytes Storage methodDescription
1Transaction knowledge2High bytes in frontUsually the message sequence number
2Protocol identifier2High bytes in frontGenerally, the default is 00 00
3Message length2High bytes in frontRemove the transaction identification, protocol identification, and data byte length of the message length
4Unit identification1Range 0x01~0xFE; the factory default value is 1, and the rest are used for the slave station number of the RS485 port
5Function Code10x06Related function codes of MODBUS communication protocol
6Start address2High bytes in front
7Register value2High bytes in front

Write Single Holding Register Answer Message Format Description

Serial numberMessage fieldLength (bytes)Bytes Storage methodDescription
1Transaction knowledge2High bytes in frontGenerally, it is the sequence number of the message, which is the same as the request message
2Protocol identifier2High bytes in frontGenerally, the default is 00 00
3Message length2High bytes in frontRemove the transaction identification, protocol identification, and data byte length of the message length
4Unit identification1Range 0x01~0xFE; the factory default value is 1, and the rest are used for the slave station number of the RS485 port
5Function Code10x06Related function codes of MODBUS communication protocol
6Start address2High bytes in front
7Register value2High bytes in front

Example Message Description
Set the holding register 40005 channel value of slave 127 to 0x9C45.

Request message:00 00 00 00 00 00 06 7F 06 00 04 9C 45
Answer message:00 00 00 00 00 06 7F 06 00 04 9C 45

Write Multiple Holding Register Command

Protocol Description
Function code:0x10
This command is only used to write multiple values continuously to the slave-holding register connected to the RS485 interface of the machine.

Write multiple holding register request message format description

Serial numberMessage fieldLength (bytes)Bytes Storage methodDescription
1Transaction knowledge2High bytes in frontUsually the message sequence number
2Protocol identifier2High bytes in frontGenerally, the default is 00 00
3Message length2High bytes in frontRemove the transaction identification, protocol identification, and data byte length of the message length
4Unit identification1The range is from 0x02~0xFE; used to connect the slave address of the RS485 port
5Function Code10x10Related function codes of MODBUS communication protocol
6Start address2High bytes in front
7Number of registers2High bytes in front
8Number of data1Assuming that the number of registers is N, the value of the number of data is 2N, unit: byte
9Data2Nlow word firstAssuming that the number of registers is N, the length (byte) of the data is 2N
Serial numberMessage fieldLength (bytes)Bytes Storage methodDescription
1Transaction knowledge2High bytes in frontGenerally, it is the sequence number of the message, which is the same as the request message
2Protocol identifier2High bytes in frontGenerally, the default is 00 00
3Message length2High bytes in frontRemove the transaction identification, protocol identification, and data byte length of the message length
4Unit identification1The range is from 0x02~0xFE; used to connect the slave address of the RS485 port
5Function Code10x10Related function codes of MODBUS communication protocol
6Write Address2High bytes in front
7Number of registers2High bytes in front

Example message description

Set the value of channel 40001~40004 of slave 127 to 0x9C41, 0x9C42, 0x9C43, and 0x9C44 respectively.

Request message:00 00 00 00 00 00 0F 7F 10 00 00 00 04 08 9C 41 9C 42 9C 43 9C 44
Answer message:00 00 00 00 00 06 7F 10 00 00 00 04

9 thoughts on “ETH-MODBUS-IO8R-A”

  1. ignore o anterior

    I’m a problem. I can write, turning on all digital ports, but don’t kill the writing and turn off all after 1 second. I’m using pymodbus. Can you help me?

    code:
    from pymodbus.client.sync import ModbusTcpClient as ModbusClient
    import time

    modbus_client = ModbusClient(‘192.168.1.12’, port=502)
    modbus_client.connect()
    UNIT = 0x01
    status = 0XFF00
    for i in range(0, 8):

    modbus_client.write_coil( i, status,unit=UNIT)

    print(“Current State of DI0: ” ,
    modbus_client.read_coils(0, 1,unit=UNIT))

    Reply
  2. I have a MODBUS 8AI module. I can read all input channels but I want to change the device address from the default address of #1. How can I do this please?

    Reply
    • please check post.
      Modify local address

      Set the station number from 1 to 32

      To modify the station number in the range of 1~32, you must adjust the status of the “Station Address” dip switch on the module, and note that when adjusting the dip switch status when the module is powered on, the module must be powered off for at least 3S and then powered on again to take effect. The following table shows the corresponding relationship (all dip codes are OFF at the factory).

      Reply
  3. Tried login to change IP address using above instruction, amx666 , but nothing. Then if you use any other info it goes to a page with admin ,admin , but entering that still wont login to change page.

    Reply

Leave a Comment