# Read PLC-variables on a S7-1500 with Raspberry Pi

**URL:** <https://discourse.nodered.org/t/read-plc-variables-on-a-s7-1500-with-raspberry-pi/25608>\
**Category:** Industrial\
**Created:** [27 April 2020 09:35 UTC](https://discourse.nodered.org/t/read-plc-variables-on-a-s7-1500-with-raspberry-pi/25608 "2020-04-27T09:35:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![noob](https://avatars.discourse-cdn.com/v4/letter/n/5e9695/32.png) [@noob](https://discourse.nodered.org/u/noob)\
**Post date:** [27 April 2020 09:35 UTC](https://discourse.nodered.org/t/read-plc-variables-on-a-s7-1500-with-raspberry-pi/25608/1 "2020-04-27T09:35:11Z")

</div>

Hey Guys,

i want to read a variable from my Siemens ET200SP with Node-RED on Raspberry Pi via Ethernet. I tried the "S7 in"-Node, but there are 2 Errors.  
"Error:connect ECONNREFUSED 192.168.0.1:102"  
and  
"Error:connect ECONNREFUSED 127.0.0.1:102".  
Under the note there is the red "offline"-mark.  
I hope there is any help for me...

---

<div class="post-metadata">

**Author:** ![dathor](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@dathor](https://discourse.nodered.org/u/dathor)\
**Post date:** [27 April 2020 12:21 UTC](https://discourse.nodered.org/t/read-plc-variables-on-a-s7-1500-with-raspberry-pi/25608/2 "2020-04-27T12:21:53Z")

</div>

Can you ping the plc? In plc enable get/put and in node setup rack = 1.

---

<div class="post-metadata">

**Author:** ![noob](https://avatars.discourse-cdn.com/v4/letter/n/5e9695/32.png) [@noob](https://discourse.nodered.org/u/noob)\
**Post date:** [27 April 2020 12:28 UTC](https://discourse.nodered.org/t/read-plc-variables-on-a-s7-1500-with-raspberry-pi/25608/4 "2020-04-27T12:28:45Z")

</div>

If i ping it, the Raspberry Pi`s Output is:"PING 192.168.0.1(192.168.0.1) 56(84) Bytes of data".

---

<div class="post-metadata">

**Author:** ![noob](https://avatars.discourse-cdn.com/v4/letter/n/5e9695/32.png) [@noob](https://discourse.nodered.org/u/noob)\
**Post date:** [27 April 2020 12:30 UTC](https://discourse.nodered.org/t/read-plc-variables-on-a-s7-1500-with-raspberry-pi/25608/5 "2020-04-27T12:30:27Z")

</div>

Where is this "get/put" in PLC? I can`t find it

---

<div class="post-metadata">

**Author:** ![dathor](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@dathor](https://discourse.nodered.org/u/dathor)\
**Post date:** [27 April 2020 12:32 UTC](https://discourse.nodered.org/t/read-plc-variables-on-a-s7-1500-with-raspberry-pi/25608/6 "2020-04-27T12:32:40Z")

</div>

Sorry don’t have tia open in front of me. You will have do a bit of digging through the controller properties. It’s there...

---

<div class="post-metadata">

**Author:** ![rromele](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rromele/32/18431_2.png) [@rromele](https://discourse.nodered.org/u/rromele)\
**Post date:** [27 April 2020 22:24 UTC](https://discourse.nodered.org/t/read-plc-variables-on-a-s7-1500-with-raspberry-pi/25608/7 "2020-04-27T22:24:44Z")

</div>

> [@noob](#):
>

Hi,  
S7-1200 and S7-1500 CPU access requires access using "Slot 1" and you must disable optimized block access (in TIA portal) for the blocks you are using. In addition, you must "Enable GET/PUT Access" in the 1200/1500 controller in TIA Portal. Doing so opens up the controller for other access by other applications as well, so be aware of the security implications of doing this.

 ![plc](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/b/dbf709a121e6f3b376034fb2a736e3e2710d3489.jpeg)

---

<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:** [26 June 2020 22:24 UTC](https://discourse.nodered.org/t/read-plc-variables-on-a-s7-1500-with-raspberry-pi/25608/8 "2020-06-26T22:24:48Z")

</div>

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