# S7 1200 Modbus TCP IP starting from OP320 display

**URL:** https://discourse.nodered.org/t/s7-1200-modbus-tcp-ip-starting-from-op320-display/73776
**Category:** Industrial
**Created:** [16 January 2023 19:22 UTC](https://discourse.nodered.org/t/s7-1200-modbus-tcp-ip-starting-from-op320-display/73776 "2023-01-16T19:22:32Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Lupin\_III](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lupin_iii/32/67650_2.png) [@Lupin\_III](https://discourse.nodered.org/u/Lupin_III)
#### Post date: [16 January 2023 19:22 UTC](https://discourse.nodered.org/t/s7-1200-modbus-tcp-ip-starting-from-op320-display/73776/1 "2023-01-16T19:22:32Z")

</div>

Hi, could you please help me to understand how to read Siemens S7 1200 registers starting from the following input?  
To interact with the PLC I have an OP operate panel (Xinje OP320) connected via RS 485.  
I need to read the same data just quering the PLC but via standard modbus TCP IP, and for this I'm using node-red-contrib-modbus.  
I've tryed several ways but nothing. The OP works correctly, and here you can see a testing page:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/a/3addfd66a8dd49e8a242f625815ccacd02fe5906.png)

In this case I should use:

- FC3 function (read holding registers) / FC4 function (read holding registers)
- address: 172
- quantity: 2

Right?  
But I don't get any data, any errors, nothing  
Thanks

---

<div class="post-metadata">

### Author: ![MountainKing91](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mountainking91/32/59516_2.png) [@MountainKing91](https://discourse.nodered.org/u/MountainKing91)
#### Post date: [26 February 2023 16:25 UTC](https://discourse.nodered.org/t/s7-1200-modbus-tcp-ip-starting-from-op320-display/73776/2 "2023-02-26T16:25:54Z")

</div>

Hi,  
in order to receive some help, please share some details about your hardware configuration.  
If I understand correctly, you are trying to read the PLC modbus registers via Modbus TCP/IP from your PC with Node-RED. Is that right?  
Can you ping the PLC from your PC? In the PLC how is the modbus server configured? Since the RS-485 communication is working, I guess you configured a Modbus slave FB in the PLC program; for Modbus TCP you probably need a specific (different) FB.

---

<div class="post-metadata">

### Author: ![Lupin\_III](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lupin_iii/32/67650_2.png) [@Lupin\_III](https://discourse.nodered.org/u/Lupin_III)
#### Post date: [27 February 2023 09:53 UTC](https://discourse.nodered.org/t/s7-1200-modbus-tcp-ip-starting-from-op320-display/73776/3 "2023-02-27T09:53:20Z")

</div>

Thanks @MountainKing91. Yes I can ping the PLC. Actually I thougth I could reach the PLC via modbus TCP but this is not correct. Yes, I can reach it via TCP but using S7 protocol, not modbus. Infact I can read and write data directly in node-red just using node-red contrib s7.  
The problem is that the only information I have are the registers set in the OP operate panel, as for the above image. So I 'm trying to understand if there is a way to read/write those exact registers in order to remote the panel

---

<div class="post-metadata">

### Author: ![MountainKing91](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mountainking91/32/59516_2.png) [@MountainKing91](https://discourse.nodered.org/u/MountainKing91)
#### Post date: [2 March 2023 11:54 UTC](https://discourse.nodered.org/t/s7-1200-modbus-tcp-ip-starting-from-op320-display/73776/4 "2023-03-02T11:54:48Z")

</div>

In your plc program you should have the "MB\_SLAVE" function block which sets up the modbus slave and all the registers. Somewhere in the plc program you should have a bunch of networks where you map specific variables to the modbus slave registers.

It all comes down to how you set up the slave, can you take a look at the plc program?

---

<div class="post-metadata">

### Author: ![Lupin\_III](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lupin_iii/32/67650_2.png) [@Lupin\_III](https://discourse.nodered.org/u/Lupin_III)
#### Post date: [6 March 2023 14:45 UTC](https://discourse.nodered.org/t/s7-1200-modbus-tcp-ip-starting-from-op320-display/73776/5 "2023-03-06T14:45:45Z")

</div>

> [@MountainKing91](#):
>
> It all comes down to how you set up the slave, can you take a look at the plc program?

No, that's the problem. I hoped they were enough the info I had ☹

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [5 May 2023 14:46 UTC](https://discourse.nodered.org/t/s7-1200-modbus-tcp-ip-starting-from-op320-display/73776/6 "2023-05-05T14:46:38Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
