# Node-red read thousands of data from db with s7

**URL:** <https://discourse.nodered.org/t/node-red-read-thousands-of-data-from-db-with-s7/96919>\
**Category:** General\
**Created:** [6 May 2025 11:01 UTC](https://discourse.nodered.org/t/node-red-read-thousands-of-data-from-db-with-s7/96919 "2025-05-06T11:01:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mustafa19077](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mustafa19077/32/100605_2.png) [@Mustafa19077](https://discourse.nodered.org/u/Mustafa19077)\
**Post date:** [6 May 2025 11:01 UTC](https://discourse.nodered.org/t/node-red-read-thousands-of-data-from-db-with-s7/96919/1 "2025-05-06T11:01:42Z")

</div>

Hello Community,

In my current project, I am reading thousands of data from plc db. For instance, i reads between 50-150 variables from just one db. Each variable is string[18]. I am connecting about 100 different db. 100_50_20 = 100,000 byte. This is how much byte i read inside 3-5seconds.  
Sometimes i get timeout, our connreset or something like that. I want to optimize the way ı read from plc. I read about reading 1000bytes in single tag instead of using 50 different tag etc. But ı didnt find how can i do. What is your suggestion for my situation. What is the best way of reading thousands of bytes?  
(I am using 1508S soft controller as plc)

---

<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:** [8 May 2025 06:19 UTC](https://discourse.nodered.org/t/node-red-read-thousands-of-data-from-db-with-s7/96919/2 "2025-05-08T06:19:32Z")

</div>

You are overloading your driver with that amount of data. Options:

- you have to reduce the polling rate
- do variable batching yourself by using dynamic s7 node example: [node-red-contrib-s7-dynamic (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-s7-dynamic)
- create multiple connections and distribute tags in there

---

<div class="post-metadata">

**Author:** ![Mustafa19077](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mustafa19077/32/100605_2.png) [@Mustafa19077](https://discourse.nodered.org/u/Mustafa19077)\
**Post date:** [8 May 2025 06:58 UTC](https://discourse.nodered.org/t/node-red-read-thousands-of-data-from-db-with-s7/96919/3 "2025-05-08T06:58:49Z")

</div>

I found a simple and effective solutions for this. I convert the adress from DB10,S0.18 (if i read 20 tags i created 20 tag also like this DB10,S20.18 .... ) to DB10,S0.18.20 (.20 means read 20 variable from starting ofset. It solve my problem easiliy. After this, I can read 28 different db with just 3 connection. Critcal point is the variable you will read should be in a row. Currently, I can read every db every 500ms with timeout 1000ms. and It looks okay for now.

---

<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:** [22 May 2025 06:59 UTC](https://discourse.nodered.org/t/node-red-read-thousands-of-data-from-db-with-s7/96919/4 "2025-05-22T06:59:19Z")

</div>

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