Adding tags values from fins node

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

[{"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
.............................................................................
screenshot 1

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

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

image

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)

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. :neutral_face:

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?

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.

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...

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

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 (there is even a demo in the import examples - press CTRL+I to access examples)

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).

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

:face_with_monocle: this, I can make it work :+1: . need to do some copy pasting in spreadsheet

I thought if I get all tag values, review checkpoints might reduce. :man_shrugging:

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?

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)