Wiring Diagram

Note: Only one serial port type can be connected to a single channel at the same time. The wiring shown in the diagram is for illustration purposes only, and specific connections should be made according to practical usage.
Terminal Description
| Terminal | Terminal Description | |
| R1+/A1 | COM1 serial port RS422 signal receive + | COM1 serial port RS485 signal receive A+ |
| T1+ | COM1 serial port RS422 signal transmit + | |
| R1-/B1 | COM1 serial port RS422 signal receive - | COM1 serial port RS485 signal receive B- |
| T1- | COM1 serial port RS422 signal transmit - | |
| R1 | COM1 serial port RS232 signal receive | |
| T1 | COM1 serial port RS232 signal transmit | |
| GND | COM1 serial port RS232 signal GND | |
| PE | Ground | |
| R2+/A2 | COM2 serial port RS422 signal receive + | COM2 serial port RS485 signal receive A+ |
| T1+ | COM2 serial port RS422 signal transmit + | |
| R2-/B2 | COM2 serial port RS422 signal receive - | COM2 serial port RS485 signal receive B- |
| T2- | COM2 serial port RS422 signal transmit - | |
| R2 | COM2 serial port RS232 signal receive | |
| T2 | COM2 serial port RS232 signal transmit | |
| GND | COM2 serial port RS232 signal GND | |
| PE | Ground | |
| R3+/A3 | COM3 serial port RS422 signal receive + | COM3 serial port RS485 signal receive A+ |
| T3+ | COM3 serial port RS422 signal transmit + | |
| R3-/B3 | COM3 serial port RS422 signal receive - | COM3 serial port RS485 signal receive B- |
| T3- | COM3 serial port RS422 signal transmit - | |
| R3 | COM3 serial port RS232 signal receive | |
| T3 | COM3 serial port RS232 signal transmit | |
| GND | COM3 serial port RS232 signal GND | |
| PE | Ground | |
| R4+/A4 | COM4 serial port RS422 signal receive + | COM4 serial port RS485 signal receive A+ |
| T4+ | COM4 serial port RS422 signal transmit + | |
| R4-/B4 | COM4 serial port RS422 signal receive - | COM4 serial port RS485 signal receive B- |
| T4- | COM4 serial port RS422 signal transmit - | |
| R4 | COM4 serial port RS232 signal receive | |
| T4 | COM4 serial port RS232 signal transmit | |
| GND | COM4 serial port RS232 signal GND | |
| PE | Ground | |
COE General Parameter Description

| Parameters | Description |
|
2001:01 EtherCATBusErrCOMEN |
The parameter is used to set whether the COM can transmit/receive data normally after the module communication is disconnected: 0: COM cannot transmit/receive data normally after ECT disconnection 1: COM can transmit/receive data normally after ECT disconnection |
Parameter Description
SRE6002 and SRE6004 are modules with 2 and 4 serial ports respectively, and their parameter descriptions are the same. The following description takes SRE6004 as an example. The configuration of the SRE6002 can be performed accordingly. All parameter changes take effect immediately, without requiring power outage or restart, as shown below:

| Parameters | Description |
| Duplex Mode |
0: Full duplex (RS232/RS422) 1: Half duplex (RS485) |
| Baudrate |
Baud rate: 0:1200 1:2400 2:4800 3:9600 4:19200 5:38400 6:57600 7:115200 |
| Data Bit |
Data bit: 0: 8-bit 1: 7-bit |
| Stop Bit |
Stop bit: 0: 1-bit 1: 2-bit |
| Parity Bit |
Parity bit: 0: No parity 1: Odd parity 2: Even parity |
| ReceiveTimeout |
Serial port receive timeout: 5-200 (unit: ms) If the value is out of range, it shall be calculated as the maximum value, e.g., a value exceeding 200 is calculated as 200. |
| Modbus Master ResponseTimeout |
Modbus RTU master mode response timeout If the slave station fails to respond within the set time, it is judged as a communication timeout 5-5000 (unit: ms) If the value is out of range, it shall be calculated as the maximum value, e.g., a value exceeding 5000 is calculated as 5000. |
| Modbus Master Scan Time |
Modbus RTU master mode polling time The interval between the completion of one command and the next in MBS master mode Unit: ms |
Configuration Module Description
Each serial port can be independently configured as Modbus master, Modbus slave, or free port; the Modbus master can be configured with a maximum of 32 modules, the Modbus slave can be configured with a maximum of 1 module, and the free port can be configured with a maximum of 1 module.
Modbus Master Configuration
In the Slot, select the module corresponding to the serial port, and add the module to be configured. For example, add "Read 32 Words 4xxxx" to Serial Port 1. Each serial port can be configured with a maximum of 32 modules under reasonable allocation, as shown below:

After configuration, add and refresh the IO to enable OP, as shown below:

| Parameters | Description |
|
State |
Module status: 1: Communication Normal 2: Communication Timeout 3: CRC Error 4: Function Code or Address Error |
|
Output Data |
Output Address: Output Data 1~Output Data x |
|
Slave ID |
ID of the slave to be accessed |
|
Addr |
Address of the Modbus to be accessed |

| Parameters | Description |
|
Input Data |
Input address: Input Data 1~Input Data x |
|
State |
Module status: 1: Communication Normal 2: Communication Timeout 3: CRC Error 4: Function Code or Address Error |
|
Slave ID |
ID of the slave to be accessed |
|
Addr |
Address of the Modbus to be accessed |
Modbus Slave Configuration
In the Slot, select the module corresponding to the serial port, and add the slave module to be configured. Each serial port can be configured with a maximum of 1 module. If more than 1 module is configured, OP will fail, as shown below:

After configuration, add and refresh the IO to enable OP, as shown below:

| Parameters | Description |
|
Input Datas: |
Input Data 1~Input Data x The starting address of the data area that allows writing by the Modbus RTU master is 40256 |
|
Output Datas: |
Output Data 1~Output Data x The starting address of the data area that allows reading by the Modbus RTU master is 40001 |
|
Slave ID: |
ID of Local slave |
Free Port Configuration
In the Slot, select the module corresponding to the serial port and add it. Each serial port can be configured with a maximum of 1 module. If more than 1 is configured, OP will fail, as shown below:

Input parameter description:

| Parameters | Description |
| Status word meanings | Transmit Done: Current frame data transmission has been completed |
| Receive request: New data is to be received | |
| Init accepted: Serial port reinitialization has been completed | |
| SndBuffer full: The sent frame length exceeds 1024 | |
| PutData Done: Writing the sent data into the transmission buffer has been completed | |
| Input length: Current data reception length | |
| Total input length: Total length of data frame | |
| Data In 0~Data In 31 | Receive data buffer |
Output parameter description:

| Parameters | Description |
| Ctrl word meaning | Transmit request: a transmit request |
| Receive accepted: Data has been received | |
| Init request: Reinitialize the serial port | |
| Put data: Write the sending data into the transmit buffer | |
| Output length: Total length of the transmitted data frame | |
| Data Out 0~Data Out 31 | Data transmission buffer |
When performing the free port communication, it is recommended to initialize the serial port before receiving or transmitting data. After successful initialization, the initialization control word “Init request” shall be set to 0; otherwise, the serial port cannot transmit or receive data normally.
Transmit data:
(1) Initialize the serial port. When the control word “Init request” of COM1 is set to 1 and the status word “Init accepted” of COM1 displays 1, the initialization has been completed.
(2) Set the transmitted data length by writing 40 into the control word “Output length” of COM1.
(3) Write the data to be sent, from 1 to 32, into Output1~Output32 in sequence. (A maximum of 32 bytes of data can be written into the transmission buffer at a time. If the length of the data to be sent is greater than 32 bytes, the data needs to be written into the transmission buffer in batches and then sent out all at a time. For example, to transmit 40 bytes of data, write the data into the transmission buffer in two batches and then transmit all 40 bytes at a time.)
(4) Set the control word “Transmit request” of COM1 to 1, and simultaneously set the control word “Put data” to 1.
(5) Read the status word “PutData Done” of COM1. When PutData Done is 1, it indicates that 32 bytes have been successfully written into the transmission buffer. Then set the control word “Put data” to 0.
(6) Write data 33~40 into Output1~Output8, and then set the control word “Put data” to 1.
(7) When the status word “Transmit Done” of COM1 is 1, it indicates that the current data frame has been successfully sent. Then set the control words “Transmit request” and “Put data” to 0; the current frame transmission is completed.
Receive data:
(1) When the module is receiving data, the "Receive request" status word of COM2 is 1; Input length is 32, indicating that the currently receivable data is 32; Total input length displays a total length of 40;
(2) Reading Input1~Input32 allows access to the first 32 bytes. Set the control word “Receive accepted” of COM2 to 1. When the status word “Receive request” of COM2 is read as 0 at this time, set the control word “Receive accepted” of COM2 to 0. After setting it to 0, the status word “Receive request” of COM2 displays 1, and “Input length” shows 8, indicating there are 8 bytes of data to be received.
(3) At the moment, reading Input1~Input8 is to read the next 8 bytes. After reading, set the control word “Receive accepted” of COM2 to 1 and then to 0. After setting it to 0, the status word “Receive request” of COM1 displays 1. The current data frame reception is complete.