tyrrellsystems / node-red-contrib-serial-modbus

This node is now maintained from @leifnel's fork
https://github.com/leifnel/node-red-contrib-serial-modbus
Apache License 2.0
7 stars 13 forks source link

Modbus - Read and write #20

Open davidoc85 opened 7 years ago

davidoc85 commented 7 years ago

I was doing some testing on the modbus node and it seems like there are two issues.

  1. When trying to write a value sometimes it doesn't work, and on some systems it does. I think this has to do with the function code that the modbus-serial is trying to write with.

  2. When reading values and timeout occurs, the values then get queued up and then after a while all come through at once. How big is the queue? The driver should be able to manage the read and write requests with with a response timeout value and a polling interval. How is this managed when there are several points (around 60)?

davidoc85 commented 7 years ago

Code attached in text file and preview as an image below:

nodesserial.txt

test
davidoc85 commented 7 years ago

When testing with an external software, the following commands are sent. What are the function codes set by default when trying to write?

Command to send: in order to change value to 105 2017/03/06 14:30:46 >>> 02 06 00 80 00 69 48 3F 2017/03/06 14:30:46 < 02 06 00 80 00 69 48 3F

Command to read: 2017/03/06 14:31:11 >>> 02 03 00 80 00 01 85 D1 2017/03/06 14:31:11 < 02 03 02 00 69 3C 6A

modbus