Thank you for your answer, but how can do it in my function if i have two output of my ModbusTcpip1 and ModbusTcpip1 than who have the same name(msg.payload)?
This is my secend question.
Do you mean the arrays are coming in on separate messages? If so then you can use the Join node in Manual mode to combine the two message payloads into a single message containing a key/value object and then you can combine the arrays.
but the only way to concatenate the two arrays, it to change the name of the output of each mosbus to integrate them into function (how can I distinguish between the two output in function, they have the same name "msg.payload"?)
I hope you have understood my problem.
thank you
You can add a change node between the Mod bus to node and the array function node
and set e.g. msg.topic=1, the same for the ReadModBUSLabview > msg.topic=2
In your array function first check the msg.topic:
If (msg.topic === 1) {
// ...
} else if (msg.topic === 2) {
// ...
}
This is exactly what I was looking for, I did not make the difference between the topic and the playload for each node , I think with this method I can do what I want
This thread is two years old, please start a new one describing your problem. If you are trying to solve it using the marked solution above then explain what the problem is when you try that.