# S7comm with raspberry pi

**URL:** https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954
**Category:** Industrial
**Created:** [12 July 2020 15:16 UTC](https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954 "2020-07-12T15:16:50Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![usmanEmder](https://avatars.discourse-cdn.com/v4/letter/u/977dab/32.png) [@usmanEmder](https://discourse.nodered.org/u/usmanEmder)
#### Post date: [12 July 2020 15:16 UTC](https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954/1 "2020-07-12T15:16:50Z")

</div>

Hi everyone.  
I am using using "s7comm" node with raspberry pi in a common network. But It shows "error" and "disconnected". While I used the same setting with my laptop and that was working fine. Does anyone know how to fix this issue?

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [12 July 2020 16:59 UTC](https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954/2 "2020-07-12T16:59:01Z")

</div>

Can you ping the s7 from the Pi?

---

<div class="post-metadata">

### Author: ![usmanEmder](https://avatars.discourse-cdn.com/v4/letter/u/977dab/32.png) [@usmanEmder](https://discourse.nodered.org/u/usmanEmder)
#### Post date: [12 July 2020 18:10 UTC](https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954/3 "2020-07-12T18:10:36Z")

</div>

Check the following picture for further detail:

 ![pc](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/7/87972e87e41a199b02e1701c1554a4f046a74c51.jpeg)

 ![pi](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/c/9cd7279901dc075cdae6158e01588562ac0f5ade.jpeg)

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [12 July 2020 20:47 UTC](https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954/4 "2020-07-12T20:47:33Z")

</div>

And the answer to my question?

---

<div class="post-metadata">

### Author: ![usmanEmder](https://avatars.discourse-cdn.com/v4/letter/u/977dab/32.png) [@usmanEmder](https://discourse.nodered.org/u/usmanEmder)
#### Post date: [13 July 2020 00:27 UTC](https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954/5 "2020-07-13T00:27:29Z")

</div>

I am not sure about it.

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [13 July 2020 04:36 UTC](https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954/6 "2020-07-13T04:36:30Z")

</div>

What you not sure about? How to ping???

---

<div class="post-metadata">

### Author: ![usmanEmder](https://avatars.discourse-cdn.com/v4/letter/u/977dab/32.png) [@usmanEmder](https://discourse.nodered.org/u/usmanEmder)
#### Post date: [13 July 2020 07:51 UTC](https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954/7 "2020-07-13T07:51:31Z")

</div>

Yeah, I just connected raspberry pi, PLC, and my laptop on the same network. And just used "s7comm" node.

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [13 July 2020 15:33 UTC](https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954/8 "2020-07-13T15:33:47Z")

</div>

Have you really checked they are all on the same network? That is why I asked

To verify this, what is shown when you write "ifconfig" in a terminal?

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

What is your router ip address?  
Then try to ping your router, your laptop and then the s7. Here I ping my router  
If you feel uncomfortable with these type of linux commands, I'm worried, don't think I can help you more

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/b/fb7064f3c2ad7da20ed1c142fe64d3370c99d120.jpeg)

---

<div class="post-metadata">

### Author: ![usmanEmder](https://avatars.discourse-cdn.com/v4/letter/u/977dab/32.png) [@usmanEmder](https://discourse.nodered.org/u/usmanEmder)
#### Post date: [13 July 2020 17:29 UTC](https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954/9 "2020-07-13T17:29:47Z")

</div>

Thanks for your kind response, I always happy to learn something new and It will be my pleasure to learn something form you.  
My router IP is :192.168.178.1 and PLC IP is :192.168.0.1  
While I used both commands and the following image shows the status.

 ![ifconfig](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/a/2afab1279f96b7c07c385ec6e1c5e2a55e1887e0.jpeg)

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [13 July 2020 17:52 UTC](https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954/10 "2020-07-13T17:52:09Z")

</div>

I think there is the problem. The PLC (S7) has ip 192.168.0.1 so I assume you cannot reach it from the RPi that has 192.168.178.82

They are on different network segment so I do not think you can ping the S7 from the Rpi

Try now the following command on the raspberry:  
ping 192.168.0.1

What is shown now?

I assume you have to change so they are all on the same network segment. Easiest might be to change the ip in the S7 to a free address, something like 192.168.178.X (where X is a number not already taken)

---

<div class="post-metadata">

### Author: ![usmanEmder](https://avatars.discourse-cdn.com/v4/letter/u/977dab/32.png) [@usmanEmder](https://discourse.nodered.org/u/usmanEmder)
#### Post date: [13 July 2020 18:08 UTC](https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954/11 "2020-07-13T18:08:10Z")

</div>

> [@krambriw](#):
>
> ping 192.168.0.1

I got this.

![pi](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/e/ae4f95cf68f06483f208fe9a7296c782ed795857.jpeg)

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [13 July 2020 18:19 UTC](https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954/12 "2020-07-13T18:19:26Z")

</div>

Yes exactly what I guessed, there is no response from the S7

Can you now change the ip-address of the S7 to something 192.168.178.X and test again (you might have to restart the S7 after the change, I do not now how to configure the S7 (even though I worked for Siemens many years)

---

<div class="post-metadata">

### Author: ![usmanEmder](https://avatars.discourse-cdn.com/v4/letter/u/977dab/32.png) [@usmanEmder](https://discourse.nodered.org/u/usmanEmder)
#### Post date: [13 July 2020 18:20 UTC](https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954/13 "2020-07-13T18:20:46Z")

</div>

I have changed my PLC IP and now it is working 😃  
Thanks, @krambriw for your kind help.

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [13 July 2020 18:21 UTC](https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954/14 "2020-07-13T18:21:24Z")

</div>

Wonderful!!!  
Now your Node-RED connection must work also!

---

<div class="post-metadata">

### Author: ![usmanEmder](https://avatars.discourse-cdn.com/v4/letter/u/977dab/32.png) [@usmanEmder](https://discourse.nodered.org/u/usmanEmder)
#### Post date: [13 July 2020 18:22 UTC](https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954/15 "2020-07-13T18:22:01Z")

</div>

Yes 😃

---

<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: [27 July 2020 18:22 UTC](https://discourse.nodered.org/t/s7comm-with-raspberry-pi/29954/16 "2020-07-27T18:22:02Z")

</div>

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