Modbus returns only zeros. Any ideas?
Modbus returns only zeros. Any ideas?
I have a RevPi Connect + set up as a Modbus slave in PiCtory. I have a UR3e robot arm set up as the client polling the RevPi every second or so on port 502. The IP address is correct and the slave id is set to 1. But whenever I request data from the registers it always comes back as 0. Even if I set default values in piCtory or write values manually using piTest.
I have a python implementation of modbus running on the revPi and that works fine over the same network.
Any help would be greatly appreciated.
I have a python implementation of modbus running on the revPi and that works fine over the same network.
Any help would be greatly appreciated.
Re: Modbus returns only zeros. Any ideas?
The UR3e robot arm polling the RevPi must execute following modbus funtion codes.
Read Input Registers (0x04) to read Output_1 to Output_n registers of Modbus TCP slave on RevPi.
Write Multiple Registers (0x10) to write to Input_1 to Input_n registers of Modbus TCP slave on RevPi.
You can also verify this with QModMaster
https://sourceforge.net/projects/qmodmaster/
Read Input Registers (0x04) to read Output_1 to Output_n registers of Modbus TCP slave on RevPi.
Write Multiple Registers (0x10) to write to Input_1 to Input_n registers of Modbus TCP slave on RevPi.
You can also verify this with QModMaster
https://sourceforge.net/projects/qmodmaster/
KUNBUS
Re: Modbus returns only zeros. Any ideas?
Can you check the piModbusSlave log with command:
tail -f /var/log/daemon.log
tail -f /var/log/daemon.log
Re: Modbus returns only zeros. Any ideas?
Can you check the piModbusSlave log with command:
tail -f /var/log/daemon.log
tail -f /var/log/daemon.log
KUNBUS
Re: Modbus returns only zeros. Any ideas?
it just constantly prints the following:
Jul 22 15:21:53 RevPi38654 piModbusSlave[2860]: read access to process image failed: -14
Jul 22 15:21:53 RevPi38654 piModbusSlave[2860]: read access to process image failed: -14
Re: Modbus returns only zeros. Any ideas?
Can you first update the RevPi device with:
sudo apt-get update && sudo apt-get upgrade && sudo reboot
Then try out again and send me following data:
_config.rsc file from /var/www/pictory/projects/
kernel log $ dmesg
sudo apt-get update && sudo apt-get upgrade && sudo reboot
Then try out again and send me following data:
_config.rsc file from /var/www/pictory/projects/
kernel log $ dmesg
KUNBUS
Re: Modbus returns only zeros. Any ideas?
Weirdly after that update/upgrade (which was the first thing I did when I turned it on) MODBUS seems to be working now. Have been able to read/write to the registers.
-
- Posts: 11
- Joined: 25 Nov 2020, 17:24
Re: Modbus returns only zeros. Any ideas?
Hello, I had the same problem.
I also already processed the apt-get update / upgrade when first configuring product (but at this time modbus was still not configured in pictory), but after some hours trying to understand, I read this forum thread and the second update fixed the problem.
I noticed that amongst updated packages, there was indeed :
Get:3 http://packages.revolutionpi.de stretch-backports/main armhf libmodbus5 armhf 3.1.6-2~bpo10+2 [30.2 kB]
I also already processed the apt-get update / upgrade when first configuring product (but at this time modbus was still not configured in pictory), but after some hours trying to understand, I read this forum thread and the second update fixed the problem.
I noticed that amongst updated packages, there was indeed :
Get:3 http://packages.revolutionpi.de stretch-backports/main armhf libmodbus5 armhf 3.1.6-2~bpo10+2 [30.2 kB]
Last edited by etienne1984 on 03 Dec 2020, 17:40, edited 1 time in total.