NR as Modbus TCP Server cannot write self register

I am not able to write address from modbus write flex node. But I can easily write data from client side.
Please Note: Node-Red is configured as Modbus TCP Server and used " node-red-contrib-modbus"

[{"id":"53780dc1.dc8c44","type":"modbus-write","z":"6b0f1c6a.49b4c4","name":"","showStatusActivities":false,"showErrors":true,"unitid":"","dataType":"HoldingRegister","adr":"2","quantity":"1","server":"701921dd.3ccc","emptyMsgOnFail":true,"x":460,"y":860,"wires":[[],["ee17f719.e3a978"]]},{"id":"ee17f719.e3a978","type":"modbus-response","z":"6b0f1c6a.49b4c4","name":"","registerShowMax":20,"x":730,"y":860,"wires":[]},{"id":"ff0d6550.2f4058","type":"inject","z":"6b0f1c6a.49b4c4","name":"","topic":"","payload":"12","payloadType":"num","repeat":"2","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":760,"wires":[["fe5bc982.0f2108"]]},{"id":"fe5bc982.0f2108","type":"modbus-server","z":"6b0f1c6a.49b4c4","name":"","logEnabled":false,"hostname":"127.0.0.1","serverPort":10502,"responseDelay":100,"delayUnit":"ms","coilsBufferSize":"0","holdingBufferSize":"100","inputBufferSize":"0","discreteBufferSize":"0","showErrors":false,"x":320,"y":740,"wires":[["cfc2fc8a.88d73"],[],[],[],[]]},{"id":"cfc2fc8a.88d73","type":"debug","z":"6b0f1c6a.49b4c4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":550,"y":740,"wires":[]},{"id":"d38739bf.6ee658","type":"inject","z":"6b0f1c6a.49b4c4","name":"","topic":"","payload":"12","payloadType":"num","repeat":"3","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":840,"wires":[["53780dc1.dc8c44"]]},{"id":"701921dd.3ccc","type":"modbus-client","z":"6b0f1c6a.49b4c4","name":"Modbus Flex Server","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"tcpHost":"127.0.0.1","tcpPort":"18502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectTimeout":"2000"}]

it is not clear what you need to do.

can't write to an instrument on the network?

but can you successfully publish the data to a client?

you should put some more data.

Yes, I am able to establish communication with client that means client can read and write. But I cannot write any data from Node-Red which is the main purpose of being creating it as a server.

if you want to publish data on the network as a server to a client you must set the network address of your PC in the node-red server configuration.

in the flow you posted you put 127.0.0.1 which is the local host,
also you must:

use the same port as the client (502, 10502, etc.)
set the ID parameter that the client will have to point to (1, 2, 3)
set the addresses to be read by the client

I already assigned all configuration but it didn't work.
As I said communication is done. But couldn't write data from Node-Red. I think there might be some issue with the node or I am missing something important.

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