> For the complete documentation index, see [llms.txt](https://wecon.gitbook.io/pistudio-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wecon.gitbook.io/pistudio-manual/11.-plc-protocols/modbus-tcp-slave-all-function.md).

# 11.15 MODBUS TCP Slave (All function)

Supported series: MODBUS TCP controller

HMI works as MODBUS TCP MASTER coonecting with TCP SLAVE

**HMI Setting**

| **Items**       | **Settings**                    | **Note** |
| --------------- | ------------------------------- | -------- |
| Protocol        | MODBUS TCP Slave (All function) |          |
| Connection      | Ethernet                        |          |
| Port No.        | 502                             |          |
| PLC station No. | 1                               |          |

**Address list**

| **Type** | **Register** | **Function code & Description**                                                                                                                                                                                           |
| -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Word** |              |                                                                                                                                                                                                                           |
|          | 3            | <p>04 (read input register: read current binary value in one or more input registers)</p><p>06 (write single register: write a binary value to a holding register)</p><p>10 (write values to multiple addresses )</p>     |
|          | 4            | <p>03 (read holding register: read current binary value in one or more holding registers)</p><p>06 (write single register: write a binary value to a holding register)</p><p>10 (write values to multiple addresses )</p> |
|          | W6           | <p>03 (read holding register: read current binary value in one or more holding registers)</p><p>06 (write single register: write a binary value to a holding register)</p><p>10 (write values to multiple addresses )</p> |
|          | W16          | <p>03 (read holding register: read current binary value in one or more holding registers)</p><p>10 (write values to multiple addresses )</p>                                                                              |
| **Bit**  |              |                                                                                                                                                                                                                           |
|          | 0            | <p>01 (Read coil state)</p><p>05 (Force a single coil to force the on/off state of a logic coil)</p><p>0F (Write multiple bits, ie write continuously)</p>                                                                |
|          | 1            | <p>02 (Read the input state)</p><p>05 (Force a single coil to force the on/off state of a logic coil)</p><p>0F (Write multiple bits)</p>                                                                                  |
|          | W5           | <p>01 (Read coil state to obtain the current state of a set of logic coils)</p><p>05 (Force a single coil to force the on/off state of a logic coil)</p><p>0F (Write multiple bits)</p>                                   |
|          | W15          | <p>01 (Read coil state to obtain the current state of a set of logic coils)</p><p>0F (Write multiple bits)</p>                                                                                                            |

**Communication settings**

1\) Enable HMI Ethernet in \[Project Settings];

![](/files/-LvJjKz7If2SxT2b6FNn)

2\) Set PLC IP in \[Device IP] settings;

![](/files/-LvJjKz8tNou6A5aHp5L)

**Communication cable**

![](/files/-LvJjKz9pT7uB794j5tR)
