Modbus Multi Register Writing

Hi, everyone, I have a small problem to solve related to the Modbus protocol,

I receive a hundred data in floating point 32 bit format from various instruments and plc on the network, I should retransmit them via Modbus Tcp / Ip to hmi in the same format.

I am using Modbus Flex Write function, but I cannot correctly compose the message to send more variables to the node.

I attach part of the "test" code with only three variables, is someone able to give me some help, or to give me straight for a professional solution?

Thank you all

Hi! I get error messages when I import your code. Could it have been something wrong when you pasted the code?

Regards
// Hobbe

....... sorry, I attach the flow file,

mdb.json (1.9 KB)

this should be the code of the "Build message" function which is the source of the problemthis should be the code of the "Build message" function which is the source of the problem:

var a = msg.payload["2"];
var b = msg.payload["3"];
var c = msg.payload["4"];
send =[a,b,c];

msg.payload = {
'value' : send,
'fc': 16,
'unitid': 1,
'address': 1,
'quantity': 3 }
return msg;

thank

Can you please save your entire flow.

// Hobbe

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