# Timeout Connection between node-red-contrib-s7 and S7-1200

**URL:** <https://discourse.nodered.org/t/timeout-connection-between-node-red-contrib-s7-and-s7-1200/80258>\
**Category:** Industrial\
**Tags:** function-node, mqtt\
**Created:** [2 August 2023 14:55 UTC](https://discourse.nodered.org/t/timeout-connection-between-node-red-contrib-s7-and-s7-1200/80258 "2023-08-02T14:55:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![XQTan00](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/xqtan00/32/81691_2.png) [@XQTan00](https://discourse.nodered.org/u/XQTan00)\
**Post date:** [2 August 2023 14:55 UTC](https://discourse.nodered.org/t/timeout-connection-between-node-red-contrib-s7-and-s7-1200/80258/1 "2023-08-02T14:55:30Z")

</div>

I'm having issues connecting the node red plc nodes with the S7-1200 in Siemens TIA Portal.

In the 's7 out' node, I've connected the IP address same with the “Device Configuration” of the S7-PLC in  
the TIA-Portal.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/e/4e61d9bd50986d67e987415e73d69b2b94e266f3.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/7/b78774cf58f4934821a19b4b740d98016f64f1fe.png)

Besides that, I also enable PUT/GET communication in the device configuration of the S7-1200 PLC

In the properties of my data block, I also unchecked the 'Optimized block access'

However, I received error from Node-Red terminal are as below:  
`Error: Timeout connecting to the transport`

How could I connect my PLC to node-red?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [2 August 2023 15:55 UTC](https://discourse.nodered.org/t/timeout-connection-between-node-red-contrib-s7-and-s7-1200/80258/2 "2023-08-02T15:55:45Z")

</div>

Hi. IP address 169.254 is probably related to your issue.

My guess is you are using a Windows computer and you have a `169.254.x.y` IP address?

This is an invalid IP automatically assgined to a windows computer when it cannot find a DCHP server. From the web:

> **When a Windows computer isn't able to communicate with the DHCP server, something called Automatic Private IP Addressing (APIPA) kicks in**. It assigns the computer an IP address that starts with 169.254.

My 2nd guess is you have connected directly from the computer to the PLC?

Assuming all of the above, you should set the IP address statically to something like `192.168.x.y` and a mask of `255.255.255.0` (or smaller) THEN set the IP of the PLC to an address in the same range.

e.g.:

- computer `192.168.10.1, 255.255.255.0`
- PLC `192.168.10.2, 255.255.255.0`

Then set the config address field to match the IP set for the PLC.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [2 August 2023 16:48 UTC](https://discourse.nodered.org/t/timeout-connection-between-node-red-contrib-s7-and-s7-1200/80258/3 "2023-08-02T16:48:45Z")

</div>

Not seeing any references to uibuilder? If this isn't a uibuilder related issue, could I please ask you remove the tag? Thanks.

---

<div class="post-metadata">

**Author:** ![XQTan00](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/xqtan00/32/81691_2.png) [@XQTan00](https://discourse.nodered.org/u/XQTan00)\
**Post date:** [3 August 2023 03:05 UTC](https://discourse.nodered.org/t/timeout-connection-between-node-red-contrib-s7-and-s7-1200/80258/4 "2023-08-03T03:05:53Z")

</div>

Thanks alot for your help Steve!

FYI, I'm using Windows computer. I am running the whole simulation using the PLCSIM, therefore it was connected to a local network called 'Siemens PLCSIM Virtual Ethernet Adapter'.

Based on your suggestions,  
I changed the IP address from both computer and PLC to `192.168.x.y`

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

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

In node-red, I'm connecting to `http://192.168.10.1:1880` host. But turns out I still have the same error.  
`Error: Timeout connecting to the transport`

---

<div class="post-metadata">

**Author:** ![KarolisL](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@KarolisL](https://discourse.nodered.org/u/KarolisL)\
**Post date:** [3 August 2023 19:49 UTC](https://discourse.nodered.org/t/timeout-connection-between-node-red-contrib-s7-and-s7-1200/80258/5 "2023-08-03T19:49:00Z")

</div>

Dumb question, but I understand that you are using PLCsim advanced. Are you able to ping downloaded PLC from your windows machine? Sometimes PLCsim advanced bricks, and it allows you to download software from TIA portal but doesn't allow external connections.

please try to replicate steps [TIA Portal V17 simulation with Node-Red without use PLC - YouTube](https://www.youtube.com/watch?v=6VAHmSL6f0w)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [3 August 2023 21:41 UTC](https://discourse.nodered.org/t/timeout-connection-between-node-red-contrib-s7-and-s7-1200/80258/6 "2023-08-03T21:41:20Z")

</div>

There a few videos on YouTube that do this.

e.g. [#118 Nodered s7 node with Siemens PLCSim Advanced operation - YouTube](https://youtu.be/wglWqr8sGyo)

---

<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:** [2 October 2023 21:41 UTC](https://discourse.nodered.org/t/timeout-connection-between-node-red-contrib-s7-and-s7-1200/80258/7 "2023-10-02T21:41:46Z")

</div>

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