Hi,
I'm using the Modbus palette node-red-contrib-modbus 3.51.0, to develop a way of testing a system I'm looking after. This is Modbus TCP/IP. Since I need to do testing where, I want to be the slave (server) to check requests from clients and also simulate the client requests to the existing server, I'm developed both. I can then disable or enable the server as required.
At the moment I'm only testing with the Modbus flex server node and the clients in my flows in node-red.
Everything is working great, when reading data from the server using the Modbus Flex Getter, and directly injecting data into the registers via the special payloads simulating the local plant.
When I try to write data from a simulated client flow with Modbus flex writer, all seems to work, i.e no errors, but it doesn't actually writes the data into the registers. At least as far as I can see it.
When using this special payload the works fine:
msg.payload = {
'value': plantValue,
'register': 'holding',
'address': 0 , // Ramp Up Time
'disableMsgOutput' : 0
};
return msg;
When using the flex writer and this:
msg.payload = { value: msg.payload, 'fc': 6, 'unitid': 1, 'address': 40001, 'quantity': 1 };
return msg;
it doesn't work, or at least when I then get the registers values, It is all 0.
I'm not sure if it's an address thing. I noticed that the writer is the only node, that you need to specify the actual address (40001 in this case) all the others nodes you specify that address as 0 and either select the Holding register by specifying it or by the FC.
This is the first time I'm actually using this palette, so maybe I am missing something.
Any help would be appreciated.
Thank you.
Kind Regards
Enginebeat