# Creating a fetch/write request to retrieve data from a PLC

**URL:** https://discourse.nodered.org/t/creating-a-fetch-write-request-to-retrieve-data-from-a-plc/84871
**Category:** Industrial
**Created:** [24 January 2024 10:18 UTC](https://discourse.nodered.org/t/creating-a-fetch-write-request-to-retrieve-data-from-a-plc/84871 "2024-01-24T10:18:28Z")
**Posts on this page:** 1
**Showing post:** 20

<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: [31 January 2024 14:06 UTC](https://discourse.nodered.org/t/creating-a-fetch-write-request-to-retrieve-data-from-a-plc/84871/20 "2024-01-31T14:06:43Z")

</div>

I think you are mixing some things: what you are listening right now is OUC.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/8/b8a2a2eeb0d14c606b82b8a0f0e16b91338b3b40.png)

Examples for this communication can be found here:

> [@Siemens 1200 plc to node red (TCP)](https://discourse.nodered.org/t/siemens-1200-plc-to-node-red-tcp/71949):
>
> I am trying to communicate with a Siemens 1212 PLC using the open TCP blocks. On the node red side I have a TCP in (Port 2000) tied to a debug node. Additionally I have an inject tied to the TCP out node on port 2001. On the PLC side I have it set to "active" communication to node red (port 2000). The receive from Node red is a passive connection (port 2001). In my flow I have a "connect" indication and can send data from the PLC to node red. On the node red side, on the send (NR -\> PLC) it sh…

This mechanism is used for event based stuff where you have to create strings.

For 90% of use cases where you need to read/write data from PLC you use  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/c/2c84564f7aeea97ad7a448b59b65e3e87761b13f.png)

probably the same manual you were referring to.

For connection to PLC in this mode, use S7 node which was recommended, slot1, port:102.  
If something is wrong then there are a lot of video tutorials and forum posts related to this topic.

---

_[View the full topic](https://discourse.nodered.org/t/creating-a-fetch-write-request-to-retrieve-data-from-a-plc/84871)._
