# Capture static data from plc

**URL:** <https://discourse.nodered.org/t/capture-static-data-from-plc/67196>\
**Category:** General\
**Tags:** function-node\
**Created:** [31 August 2022 19:49 UTC](https://discourse.nodered.org/t/capture-static-data-from-plc/67196 "2022-08-31T19:49:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alejoldu94](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@Alejoldu94](https://discourse.nodered.org/u/Alejoldu94)\
**Post date:** [31 August 2022 19:49 UTC](https://discourse.nodered.org/t/capture-static-data-from-plc/67196/1 "2022-08-31T19:49:22Z")

</div>

![oee](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/a/ea38386fb8e2a79fac2a45c52a291c988ef5330f.png)  
Hello, I am trying to capture this data that is shown in the figure to be able to generate operations, but the problem is that I can only capture it once, since the node that I occupy only sends me the data every time it changes, how could I always capture it and store them in a node and be able to manage an addition or subtraction operation.  
I capture these data from an allen bradley plc with the node "node-red-contrib-cip-ethernet-ip". it does a read every time the data changes it is written again in my debug, if the node does not receive data it does not write me in my debug. Thank you

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [31 August 2022 20:41 UTC](https://discourse.nodered.org/t/capture-static-data-from-plc/67196/2 "2022-08-31T20:41:02Z")

</div>

You can Store your data in [context](https://nodered.org/docs/user-guide/context) or a file/csv/database, using file node or database nodes. you can the recall it when required.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [31 August 2022 21:06 UTC](https://discourse.nodered.org/t/capture-static-data-from-plc/67196/3 "2022-08-31T21:06:15Z")

</div>

In what way does this question differ from your [previous post](https://discourse.nodered.org/t/group-an-array-operation-function/67128)?

---

<div class="post-metadata">

**Author:** ![Alejoldu94](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@Alejoldu94](https://discourse.nodered.org/u/Alejoldu94)\
**Post date:** [31 August 2022 22:56 UTC](https://discourse.nodered.org/t/capture-static-data-from-plc/67196/4 "2022-08-31T22:56:01Z")

</div>

The last post, i was traying to colect all my data in an array, but now i need that those array, give me all the time my data because i am trying to calculate the OEE, so i need to take all my information in realtime, but some data, doesnt change ecery time, only in one moments, so if the datta didnt change, they never arrive to my array.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [1 September 2022 06:12 UTC](https://discourse.nodered.org/t/capture-static-data-from-plc/67196/5 "2022-09-01T06:12:47Z")

</div>

In the join node set the box 'and every successive message' (I don't remember the exact text, but it is something like that). Then you will get an output with the latest value from both inputs every time.

---

<div class="post-metadata">

**Author:** ![Alejoldu94](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@Alejoldu94](https://discourse.nodered.org/u/Alejoldu94)\
**Post date:** [1 September 2022 12:23 UTC](https://discourse.nodered.org/t/capture-static-data-from-plc/67196/6 "2022-09-01T12:23:50Z")

</div>

The problem, is that i need, to operate in real time, and every moment i need to operate the information, so when i use a calculate node, this one requiered every moment data, but some of my data, doesnt change, and if my data doesnt change, this information doesnt transmit to the calculate node, and i lose information

---

<div class="post-metadata">

**Author:** ![Alejoldu94](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@Alejoldu94](https://discourse.nodered.org/u/Alejoldu94)\
**Post date:** [1 September 2022 12:24 UTC](https://discourse.nodered.org/t/capture-static-data-from-plc/67196/7 "2022-09-01T12:24:16Z")

</div>

Thank you, i´ll try it

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [1 September 2022 13:30 UTC](https://discourse.nodered.org/t/capture-static-data-from-plc/67196/8 "2022-09-01T13:30:15Z")

</div>

You need to have the Join node set to key/value mode and make sure the two paths in to it have different topic strings. Also you need 'and every subsequent message' ticked? With that ticked then you will not loose any messages and every output from the Join will have both values in it, and you can construct your array (if that is really what you want) from the data in the payload. If that doesn't work show us how you have configured the join node and and show us what you get out of it.

---

<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:** [31 October 2022 13:30 UTC](https://discourse.nodered.org/t/capture-static-data-from-plc/67196/9 "2022-10-31T13:30:30Z")

</div>

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