node-modbus-serial icon indicating copy to clipboard operation
node-modbus-serial copied to clipboard

Modbus RTU/TCP slave

Open hunter7793 opened this issue 4 years ago • 3 comments

Hi. can i using this driver and create a modbus(on RTU and TCP protocols) slave device? if i can - tell me please how, if i cant - will you add this function?

Thank you.

hunter7793 avatar Nov 09 '20 07:11 hunter7793

I'm trying to create a TCP slave device with this code here, I hope this could help you 😃. But when I request the slave value from my master, it cannot read the data and throws an error. In addition to this thread topic, someone has any idea what it could be?

PS. My master is another process, written in C

esdrasjnr avatar Nov 09 '20 07:11 esdrasjnr

A modbus slave is the same thing as a modbus server, the example @esdrasjnr links or this one in the docs should accurately represent how to use it.

@esdrasjnr this isn't my repo but generally it's a good idea to open a separate ticket with your problem, as well as sample code. I've successfully set up a modbus TCP server using this library and have retrieved data from it using this library and a number of other modbus tools, so the issue is likely a problem with your modbus master/client implementation, and difficult to help debug without some sample code

dyllan-to-you avatar Dec 23 '20 20:12 dyllan-to-you

I have a pull request in for an RTU server: https://github.com/yaacov/node-modbus-serial/pull/480

1038642892 avatar Nov 16 '22 10:11 1038642892