# Adding tags values from fins node

**URL:** <https://discourse.nodered.org/t/adding-tags-values-from-fins-node/48690>\
**Category:** General\
**Created:** [21 July 2021 07:35 UTC](https://discourse.nodered.org/t/adding-tags-values-from-fins-node/48690 "2021-07-21T07:35:55Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sahsha](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sahsha/32/43845_2.png) [@sahsha](https://discourse.nodered.org/u/sahsha)\
**Post date:** [21 July 2021 07:35 UTC](https://discourse.nodered.org/t/adding-tags-values-from-fins-node/48690/1 "2021-07-21T07:35:56Z")

</div>

I'm trying to join payloads and add specific tag values for fins node. But unable to do so. Can anyone help?  
check flow

```auto
[{"id":"92176f57.09b46","type":"FINS Read","z":"5e017413.c6817c","name":"0 - 1000","connection":"598ca92a.097818","addressType":"str","address":"D0","countType":"num","count":"1000","msgPropertyType":"msg","msgProperty":"payload","outputFormatType":"signedkv","outputFormat":"","x":360,"y":80,"wires":[["8e501122.0972b"]]},{"id":"d16a0b05.8117a8","type":"inject","z":"5e017413.c6817c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":200,"wires":[["92176f57.09b46","2868c243.3397ae","1989b74c.6f0489","99bfde2.21dee2","a3353275.31b6b","c83b18c2.6a9e28","b3c05cf9.6246f","cf6de1e6.5b774","67e4a3c5.ebcdac","fc018105.daf6e","f7e84e40.a606c"]]},{"id":"2868c243.3397ae","type":"FINS Read","z":"5e017413.c6817c","name":"1000 - 2000","connection":"598ca92a.097818","addressType":"str","address":"D1000","countType":"num","count":"1000","msgPropertyType":"msg","msgProperty":"payload","outputFormatType":"signedkv","outputFormat":"","x":370,"y":120,"wires":[["8e501122.0972b"]]},{"id":"1989b74c.6f0489","type":"FINS Read","z":"5e017413.c6817c","name":"2000 - 3000","connection":"598ca92a.097818","addressType":"str","address":"D2000","countType":"num","count":"1000","msgPropertyType":"msg","msgProperty":"payload","outputFormatType":"signedkv","outputFormat":"","x":370,"y":160,"wires":[["8e501122.0972b"]]},{"id":"99bfde2.21dee2","type":"FINS Read","z":"5e017413.c6817c","name":"3000 - 4000","connection":"598ca92a.097818","addressType":"str","address":"D3000","countType":"num","count":"1000","msgPropertyType":"msg","msgProperty":"payload","outputFormatType":"signedkv","outputFormat":"","x":370,"y":200,"wires":[["8e501122.0972b"]]},{"id":"a3353275.31b6b","type":"FINS Read","z":"5e017413.c6817c","name":"4000 - 5000","connection":"598ca92a.097818","addressType":"str","address":"D4000","countType":"num","count":"1000","msgPropertyType":"msg","msgProperty":"payload","outputFormatType":"signedkv","outputFormat":"","x":370,"y":240,"wires":[["8e501122.0972b"]]},{"id":"c83b18c2.6a9e28","type":"FINS Read","z":"5e017413.c6817c","name":"5000 - 6000","connection":"598ca92a.097818","addressType":"str","address":"D5000","countType":"num","count":"1000","msgPropertyType":"msg","msgProperty":"payload","outputFormatType":"signedkv","outputFormat":"","x":370,"y":280,"wires":[["8e501122.0972b"]]},{"id":"b3c05cf9.6246f","type":"FINS Read","z":"5e017413.c6817c","name":"6000 - 7000","connection":"598ca92a.097818","addressType":"str","address":"D6000","countType":"num","count":"1000","msgPropertyType":"msg","msgProperty":"payload","outputFormatType":"signedkv","outputFormat":"","x":370,"y":320,"wires":[["8e501122.0972b"]]},{"id":"cf6de1e6.5b774","type":"FINS Read","z":"5e017413.c6817c","name":"7000 - 8000","connection":"598ca92a.097818","addressType":"str","address":"D7000","countType":"num","count":"1000","msgPropertyType":"msg","msgProperty":"payload","outputFormatType":"signedkv","outputFormat":"","x":370,"y":360,"wires":[["8e501122.0972b"]]},{"id":"67e4a3c5.ebcdac","type":"FINS Read","z":"5e017413.c6817c","name":"8000 - 9000","connection":"598ca92a.097818","addressType":"str","address":"D8000","countType":"num","count":"1000","msgPropertyType":"msg","msgProperty":"payload","outputFormatType":"signedkv","outputFormat":"","x":370,"y":400,"wires":[["8e501122.0972b"]]},{"id":"fc018105.daf6e","type":"FINS Read","z":"5e017413.c6817c","name":"9000 - 10000","connection":"598ca92a.097818","addressType":"str","address":"D9000","countType":"num","count":"1000","msgPropertyType":"msg","msgProperty":"payload","outputFormatType":"signedkv","outputFormat":"","x":370,"y":440,"wires":[["8e501122.0972b"]]},{"id":"f7e84e40.a606c","type":"FINS Read","z":"5e017413.c6817c","name":"10000 - 11000","connection":"598ca92a.097818","addressType":"str","address":"D10000","countType":"num","count":"1000","msgPropertyType":"msg","msgProperty":"payload","outputFormatType":"signedkv","outputFormat":"","x":380,"y":480,"wires":[["8e501122.0972b"]]},{"id":"8e501122.0972b","type":"join","z":"5e017413.c6817c","name":"","mode":"custom","build":"array","property":"","propertyType":"full","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"11","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":670,"y":260,"wires":[["990c8a80.bc3f88","fd015889.e05af8"]]},{"id":"fd015889.e05af8","type":"debug","z":"5e017413.c6817c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":260,"wires":[]},{"id":"990c8a80.bc3f88","type":"function","z":"5e017413.c6817c","name":"","func":"msg.payload = msg.payload.D110\n +msg.payload.D210\n +msg.payload.D310\n +msg.payload.D410\n +msg.payload.D510\n +msg.payload.D610\n +msg.payload.D710\n +msg.payload.D810\n +msg.payload.D910\n +msg.payload.D1010\n +msg.payload.D1110\n +msg.payload.D1210\n +msg.payload.D1310\n +msg.payload.D22110\n +msg.payload.D22210\n +msg.payload.D22410\n +msg.payload.D22610;\nmsg.topic = 'Total_running_time';\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":860,"y":240,"wires":[["fd015889.e05af8"]]},{"id":"598ca92a.097818","type":"FINS Connection","name":"MT02","host":"192.168.21.156","port":"9600","MODE":"","MODEType":"NJ","protocol":"","protocolType":"udp","ICF":"0","DNA":"0","DA1":"0","DA2":"0","SNA":"0","SA1":"30","SA2":"0","autoConnect":true}]

```

check debug screenshots

 ![screenshot 1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/1/c1915093b22557899000d89645d9b3c6c1d6a2a6.png)  
.............................................................................  
 ![screenshot 1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/2/b29317125b27496442f2ad2419d0bb7e1add92a3.png)  
.............................................................................  
 ![screenshot 1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/2/a232b7c2e7c44151c4ef207953668737a57519b9.png)

---

<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:** [21 July 2021 07:53 UTC](https://discourse.nodered.org/t/adding-tags-values-from-fins-node/48690/2 "2021-07-21T07:53:42Z")

</div>

Hi, firstly, why on earth are you trying to read 11000 DM addresses?

Secondly, FINS cannot access 1000 WDS in one read...

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/7/7720eb982634187c3cb2cab193216d7433ccdd01.png)

> **[FINS%20Command%20from%20W342-E1-16.pdf](https://www.support-omron.fr/telechargements/documentations/2019-01-18%20-%2014-40-23%20-%20616945746/FINS%20Command%20from%20W342-E1-16.pdf)**
>
> 606.58 KB

Lastly, you are operating the reads in parallel then joining as an array - the results are NOT guaranteed to be returned in order (meaning your final array of data will be jumbled)

---

<div class="post-metadata">

**Author:** ![sahsha](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sahsha/32/43845_2.png) [@sahsha](https://discourse.nodered.org/u/sahsha)\
**Post date:** [21 July 2021 08:30 UTC](https://discourse.nodered.org/t/adding-tags-values-from-fins-node/48690/3 "2021-07-21T08:30:35Z")

</div>

I have tags around 27,000 configured in OMRON PLC NX102-9020 DB. I thought that if it could work then will lower the need for multiple fins read nodes. 😐

---

<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:** [21 July 2021 08:33 UTC](https://discourse.nodered.org/t/adding-tags-values-from-fins-node/48690/4 "2021-07-21T08:33:11Z")

</div>

Yeah, that's fine however what application would need to access 27000 WD values in one go?

Ps, I guess all these tags in your PLC are not simply 16bit ints or unit right? I am guessing some are string, some are float etc?

---

<div class="post-metadata">

**Author:** ![sahsha](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sahsha/32/43845_2.png) [@sahsha](https://discourse.nodered.org/u/sahsha)\
**Post date:** [21 July 2021 08:47 UTC](https://discourse.nodered.org/t/adding-tags-values-from-fins-node/48690/5 "2021-07-21T08:47:35Z")

</div>

Yes, below is the detail:

| type | count |
| --- | --- |
| int | 16125 |
| Bool | 750 |
| real | 1875 |
| String | 7858 |

where I work, one single unit have around 300 CNC machining centers. So was working on node red dashboard to display values for all machines.

---

<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:** [21 July 2021 08:53 UTC](https://discourse.nodered.org/t/adding-tags-values-from-fins-node/48690/6 "2021-07-21T08:53:36Z")

</div>

But why must you read all values to node-red?

Surely you do not need all these values at once. for example, your function contains...

```auto
msg.payload = msg.payload.D110
                +msg.payload.D210
                +msg.payload.D310
                +msg.payload.D410
                +msg.payload.D510
                +msg.payload.D610
                +msg.payload.D710
                +msg.payload.D810
                +msg.payload.D910
                +msg.payload.D1010
                +msg.payload.D1110
                +msg.payload.D1210
                +msg.payload.D1310
                +msg.payload.D22110
                +msg.payload.D22210
                +msg.payload.D22410
                +msg.payload.D22610;

```

So you could simply use a `FINS Read Multiple` node and request these 17 items in one go, as and when required.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/a/2a706846922cd3a4becf7b556e6a10e608bc8648.png)

Better still, add all these DMs in ladder and present a single DM value for collection by node-red.

  

* * *
  

Lastly, converting these other values from individual WD values is a major chore, the node works very will with its partner node [buffer-parser](https://flows.nodered.org/node/node-red-contrib-buffer-parser) (there is even a demo in the import examples - press CTRL+I to access examples)

---

<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:** [21 July 2021 08:56 UTC](https://discourse.nodered.org/t/adding-tags-values-from-fins-node/48690/7 "2021-07-21T08:56:24Z")

</div>

> [@sahsha](#):
>
> where I work, one single unit have around 300 CNC machining centers. So was working on node red dashboard to display values for all machines

So read them as blocks when triggered by a dashboard button e.g. "READ CNC 1 PROGRAM DATA" (instead of reading everything in one go).

---

<div class="post-metadata">

**Author:** ![sahsha](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sahsha/32/43845_2.png) [@sahsha](https://discourse.nodered.org/u/sahsha)\
**Post date:** [21 July 2021 09:22 UTC](https://discourse.nodered.org/t/adding-tags-values-from-fins-node/48690/8 "2021-07-21T09:22:21Z")

</div>

> [@Steve-Mcl](#):
>
> Surely you do not need all these values at once.

Each value is to be shown in a gauge and its sum is to be shown in another gauge.

> [@Steve-Mcl](#):
>
> So you could simply use a `FINS Read Multiple` node and request these 17 items in one go, as and when required.

🧐 this, I can make it work 👍 . need to do some copy pasting in spreadsheet

I thought if I get all tag values, review checkpoints might reduce. 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![sahsha](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sahsha/32/43845_2.png) [@sahsha](https://discourse.nodered.org/u/sahsha)\
**Post date:** [21 July 2021 09:44 UTC](https://discourse.nodered.org/t/adding-tags-values-from-fins-node/48690/9 "2021-07-21T09:44:48Z")

</div>

> [@Steve-Mcl](#):
>
> So you could simply use a `FINS Read Multiple` node and request these 17 items in one go, as and when required

I need two outputs from FINS Read multiple node, one in array and other in key/value.  
How can I convert key/value to array?

---

<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:** [21 July 2021 09:50 UTC](https://discourse.nodered.org/t/adding-tags-values-from-fins-node/48690/10 "2021-07-21T09:50:54Z")

</div>

Easy enough with buffer parser.

Return a buffer from FINS Read Multiple, connect to buffer parser (set to return key/value), enter the rows for the data individual items (lenght of `1`) & at the end, enter one more row of length `-1` for INT16be (or UINT16be)

---

<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:** [19 September 2021 09:51 UTC](https://discourse.nodered.org/t/adding-tags-values-from-fins-node/48690/11 "2021-09-19T09:51:40Z")

</div>

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