Page 1 of 1
Modbus returns only zeros. Any ideas?
Posted: 22 Jul 2020, 11:34
by noel_drew
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.
Re: Modbus returns only zeros. Any ideas?
Posted: 22 Jul 2020, 14:53
by Amar
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/
Re: Modbus returns only zeros. Any ideas?
Posted: 22 Jul 2020, 16:29
by noel_drew
Can you check the piModbusSlave log with command:
tail -f /var/log/daemon.log
Re: Modbus returns only zeros. Any ideas?
Posted: 27 Jul 2020, 09:33
by Amar
Can you check the piModbusSlave log with command:
tail -f /var/log/daemon.log
Re: Modbus returns only zeros. Any ideas?
Posted: 07 Aug 2020, 13:27
by noel_drew
it just constantly prints the following:
Jul 22 15:21:53 RevPi38654 piModbusSlave[2860]: read access to process image failed: -14
Re: Modbus returns only zeros. Any ideas?
Posted: 10 Aug 2020, 13:16
by Amar
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
Re: Modbus returns only zeros. Any ideas?
Posted: 12 Aug 2020, 12:51
by noel_drew
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.
Re: Modbus returns only zeros. Any ideas?
Posted: 03 Dec 2020, 17:37
by etienne1984
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]