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

I always get "TransactionTimedOutError" #29

Open jinyistudio opened 4 years ago

jinyistudio commented 4 years ago

Hi I install this node in my raspberry pi. "modbusSerial in" is working but "modbusSerial out" always give me "TransactionTimedOutError". What kind msg.payload format can i pass to "modbusSerial out" ? Can you give me a little example for write data to modbus slave ?

flow.json [{"id":"e49deb7.b240218","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"b07101e6.443e","type":"modbusSerial out","z":"e49deb7.b240218","port":"2b60ac8b.ffd254","slave":"1","start":"32","dtype":"holding","topic":"","name":"","x":430,"y":140,"wires":[]},{"id":"ef397336.ecdfa","type":"inject","z":"e49deb7.b240218","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[1,1]","payloadType":"bin","x":160,"y":180,"wires":[["b07101e6.443e"]]},{"id":"2b60ac8b.ffd254","type":"modbusSerialConfig","z":"","port":"/dev/ttyUSB0","baud":"38400","data":"8","parity":"none","stop":"1","name":""}]

larryblische commented 4 years ago

I am getting the Timedout error on writes also. Reads are working. In my case I believe my device, a Novus N321S differential temperature controller, want registers set with Modbus function code 06 - Preset Single Register. It does not appear to me that this library supports this function code. Check the specs for the device you are trying to talk to and see what Modbus function it requires.