I have previously gotten the Modbus slave to work with Node-Red on the same RevPi by using a Modbus master node in Node-Red, so I know the hardware configuration and wiring is OK. That worked at first attempt and I could read meaningful data. However, getting the RevPi virtual master to work with this slave is proving more difficult.
I've added a virtual master in Pictory, set the correct baud rate etc, and added an "action" that reads holding register 1 at slave address 1. I have saved the configuration, reloaded the driver and restarted Modbus ($ sudo systemctl restart pimodbus-master.service). When I do $ piTest -r Modbus_Action_Status_1 I get error code 12:
Code: Select all
1 Byte-Value of Modbus_Action_Status_1: 12 dez (=0c hex)
Here's the Modbus log:
Code: Select all
$ journalctl -u pimodbus-master.service | tail -n 50
Apr 29 15:50:19 RevPi52559 piModbusMaster[3461]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:19 RevPi52559 piModbusMaster[3461]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:19 RevPi52559 piModbusMaster[3461]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:20 RevPi52559 piModbusMaster[3461]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:20 RevPi52559 piModbusMaster[3461]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:20 RevPi52559 systemd[1]: Stopping Revolution Pi Modbus master...
Apr 29 15:50:20 RevPi52559 systemd[1]: pimodbus-master.service: Main process exited, code=killed, status=15/TERM
Apr 29 15:50:20 RevPi52559 systemd[1]: pimodbus-master.service: Succeeded.
Apr 29 15:50:20 RevPi52559 systemd[1]: Stopped Revolution Pi Modbus master.
Apr 29 15:50:20 RevPi52559 systemd[1]: Started Revolution Pi Modbus master.
Apr 29 15:50:20 RevPi52559 piModbusMaster[3816]: piModbusMaster started
Apr 29 15:50:20 RevPi52559 piModbusMaster[3816]: modbus rtu action timeout: 0 s 100000 us
Apr 29 15:50:20 RevPi52559 piModbusMaster[3816]: modbus rtu minimal time between telegrams: 0 s 50000 us
Apr 29 15:50:21 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:21 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:22 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:22 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:22 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:22 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:22 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:23 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:23 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:23 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:23 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:23 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:24 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:24 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:24 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:24 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:24 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:25 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:25 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:25 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:25 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:26 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/110/-112345568
Apr 29 15:50:26 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:26 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:26 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:26 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:26 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:27 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:27 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:27 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:27 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:27 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:28 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:28 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:28 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/110/-112345568
Apr 29 15:50:28 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Apr 29 15:50:28 RevPi52559 piModbusMaster[3816]: modbus rtu action device: /dev/ttyRS485, slave address: 1 function: 0x03, address: 1 failed -1/112345690/12
Any clues? What is status 12?