Modbus and Siemens Sinamics Communication

Topics about the Software of Revolution Pi
joao.pires
Posts: 12
Joined: 18 Nov 2021, 15:28

Modbus and Siemens Sinamics Communication

Post by joao.pires »

Hi,

I have an issue with the communication between the Revolution Pi and some inverters of Siemens Sinamics V20. I made the connection of the image below and test with the pc (Software - Modbus Poll).
Esquema_Ligações.png
Esquema_Ligações.png (144.5 KiB) Viewed 6234 times
Everything works fine between Sinamics -> Conversor RS485 to USB -> PC as you can see in the image.
Modbus Poll_OK.png
Modbus Poll_OK.png (165.51 KiB) Viewed 6234 times
Now i connected and configured the Revolution Pi as a master but don't receive any data. I use the same configuration of the modbus poll:
9600 bps
8 Data Bits
Parity None
2 Stop Bits
When i insert the order "Modbus_Action_Status" I receive the message "1 Byte-Value of Modbus_Action_Status: 255 dez (=ff hex) and i think i should receive something like "...0 dez/...1 dez".
P_config.png
P_config.png (384.17 KiB) Viewed 6234 times
Anyone can help?
User avatar
nicolaiB
KUNBUS
Posts: 931
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: Modbus and Siemens Sinamics Communication

Post by nicolaiB »

Hi joao.pires,

welcome to our community! Thanks for the detailed description of your setup and the problem.

Could you please share your configuration of the actions in the extended data (right click on your modbus master in pictory)?
Did you reset the driver after changing your configuration?
Is there any change if you manually restart the modbus master (sudo systemctl restart pimodbus-master.service)?

Nicolai
joao.pires
Posts: 12
Joined: 18 Nov 2021, 15:28

Re: Modbus and Siemens Sinamics Communication

Post by joao.pires »

Yes, this is my configuration od the actions:
Pi_Regist..png
Pi_Regist..png (136 KiB) Viewed 6215 times
I already made the reset driver but the issue persist.
User avatar
nicolaiB
KUNBUS
Posts: 931
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: Modbus and Siemens Sinamics Communication

Post by nicolaiB »

nicolaiB wrote: 18 Nov 2021, 17:09 Is there any change if you manually restart the modbus master (sudo systemctl restart pimodbus-master.service)?
Have you tested the restart?

Nicolai
joao.pires
Posts: 12
Joined: 18 Nov 2021, 15:28

Re: Modbus and Siemens Sinamics Communication

Post by joao.pires »

Yes i try the restart but the issue still the same
MicrosoftTeams-image (1).png
MicrosoftTeams-image (1).png (42.63 KiB) Viewed 6099 times
User avatar
nicolaiB
KUNBUS
Posts: 931
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: Modbus and Siemens Sinamics Communication

Post by nicolaiB »

Hi joao.pires,

can you please share the output of the modbus log file with the following command:

Code: Select all

journalctl -u pimodbus-master.service  | tail -n 50

Nicolai
joao.pires
Posts: 12
Joined: 18 Nov 2021, 15:28

Re: Modbus and Siemens Sinamics Communication

Post by joao.pires »

Hi Nicolai
This is the results of the command.

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2021.11.22 09:56:53 =~=~=~=~=~=~=~=~=~=~=~=
login as: pi
pi@172.31.4.99's password:
Linux RevPi100300 4.19.95-rt38-v7 #1 SMP PREEMPT RT Tue, 22 Jun 2021 14:13:31 +0000 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Nov 22 09:55:35 2021 from 172.31.4.71

]0;pi@RevPi100300: ~[01;32mpi@RevPi100300[00m:[01;34m~ $[00m journalctl -u pimodbus-master.service | tail -n 50
[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[19PpiTest -r Modbus_Action_Status_1[2PMaster_Status
1 Byte-Value of Modbus_Master_Status: 255 dez (=ff hex)
1 Byte-Value of Modbus_Master_Status: 255 dez (=ff hex)
^C
]0;pi@RevPi100300: ~[01;32mpi@RevPi100300[00m:[01;34m~ $[00m piTest -r Modbus_Master_Status
[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[Cjournalctl -u pimodbus-master.service | tail -n 50
[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[19PpiTest -r Modbus_Action_Status_1
1 Byte-Value of Modbus_Action_Status_1: 255 dez (=ff hex)
1 Byte-Value of Modbus_Action_Status_1: 255 dez (=ff hex)
^C
]0;pi@RevPi100300: ~[01;32mpi@RevPi100300[00m:[01;34m~ $[00m piTest -r Modbus_Action_Status_1[2PMaster_Status
[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[Cjournalctl -u pimodbus-master.service | tail -n 50
-- Logs begin at Sat 2021-11-20 18:21:55 WET, end at Mon 2021-11-22 09:57:02 WET. --
Nov 20 18:22:03 RevPi100300 systemd[1]: Started Revolution Pi Modbus master.
Nov 20 18:22:03 RevPi100300 piModbusMaster[1150]: piModbusMaster started
Nov 20 18:22:03 RevPi100300 piModbusMaster[1150]: piModbusMaster: /work/revpi-modbus/src/piConfigParser/piConfigParser.c:1002: parse_modbus_master_action_list: Assertion `(actionID > 0) && (actionID < INT32_MAX)' failed.
Nov 20 18:22:03 RevPi100300 systemd[1]: pimodbus-master.service: Main process exited, code=killed, status=6/ABRT
Nov 20 18:22:03 RevPi100300 systemd[1]: pimodbus-master.service: Failed with result 'signal'.
Nov 20 18:22:03 RevPi100300 systemd[1]: pimodbus-master.service: Service RestartSec=100ms expired, scheduling restart.
Nov 20 18:22:03 RevPi100300 systemd[1]: pimodbus-master.service: Scheduled restart job, restart counter is at 1.
Nov 20 18:22:03 RevPi100300 systemd[1]: Stopped Revolution Pi Modbus master.
Nov 20 18:22:03 RevPi100300 systemd[1]: Started Revolution Pi Modbus master.
Nov 20 18:22:03 RevPi100300 piModbusMaster[1185]: piModbusMaster started
Nov 20 18:22:03 RevPi100300 piModbusMaster[1185]: piModbusMaster: /work/revpi-modbus/src/piConfigParser/piConfigParser.c:1002: parse_modbus_master_action_list: Assertion `(actionID > 0) && (actionID < INT32_MAX)' failed.
Nov 20 18:22:03 RevPi100300 systemd[1]: pimodbus-master.service: Main process exited, code=killed, status=6/ABRT
Nov 20 18:22:03 RevPi100300 systemd[1]: pimodbus-master.service: Failed with result 'signal'.
Nov 20 18:22:03 RevPi100300 systemd[1]: pimodbus-master.service: Service RestartSec=100ms expired, scheduling restart.
Nov 20 18:22:03 RevPi100300 systemd[1]: pimodbus-master.service: Scheduled restart job, restart counter is at 2.
Nov 20 18:22:03 RevPi100300 systemd[1]: Stopped Revolution Pi Modbus master.
Nov 20 18:22:03 RevPi100300 systemd[1]: Started Revolution Pi Modbus master.
Nov 20 18:22:03 RevPi100300 piModbusMaster[1192]: piModbusMaster started
Nov 20 18:22:03 RevPi100300 piModbusMaster[1192]: piModbusMaster: /work/revpi-modbus/src/piConfigParser/piConfigParser.c:1002: parse_modbus_master_action_list: Assertion `(actionID > 0) && (actionID < INT32_MAX)' failed.
Nov 20 18:22:03 RevPi100300 systemd[1]: pimodbus-master.service: Main process exited, code=killed, status=6/ABRT
Nov 20 18:22:03 RevPi100300 systemd[1]: pimodbus-master.service: Failed with result 'signal'.
Nov 20 18:22:04 RevPi100300 systemd[1]: pimodbus-master.service: Service RestartSec=100ms expired, scheduling restart.
Nov 20 18:22:04 RevPi100300 systemd[1]: pimodbus-master.service: Scheduled restart job, restart counter is at 3.
Nov 20 18:22:04 RevPi100300 systemd[1]: Stopped Revolution Pi Modbus master.
Nov 20 18:22:04 RevPi100300 systemd[1]: Started Revolution Pi Modbus master.
Nov 20 18:22:04 RevPi100300 piModbusMaster[1203]: piModbusMaster started
Nov 20 18:22:04 RevPi100300 piModbusMaster[1203]: piModbusMaster: /work/revpi-modbus/src/piConfigParser/piConfigParser.c:1002: parse_modbus_master_action_list: Assertion `(actionID > 0) && (actionID < INT32_MAX)' failed.
Nov 20 18:22:04 RevPi100300 systemd[1]: pimodbus-master.service: Main process exited, code=killed, status=6/ABRT
Nov 20 18:22:04 RevPi100300 systemd[1]: pimodbus-master.service: Failed with result 'signal'.
Nov 20 18:22:04 RevPi100300 systemd[1]: pimodbus-master.service: Service RestartSec=100ms expired, scheduling restart.
Nov 20 18:22:04 RevPi100300 systemd[1]: pimodbus-master.service: Scheduled restart job, restart counter is at 4.
Nov 20 18:22:04 RevPi100300 systemd[1]: Stopped Revolution Pi Modbus master.
Nov 20 18:22:04 RevPi100300 systemd[1]: Started Revolution Pi Modbus master.
Nov 20 18:22:04 RevPi100300 piModbusMaster[1244]: piModbusMaster started
Nov 20 18:22:04 RevPi100300 piModbusMaster[1244]: piModbusMaster: /work/revpi-modbus/src/piConfigParser/piConfigParser.c:1002: parse_modbus_master_action_list: Assertion `(actionID > 0) && (actionID < INT32_MAX)' failed.
Nov 20 18:22:04 RevPi100300 systemd[1]: pimodbus-master.service: Main process exited, code=killed, status=6/ABRT
Nov 20 18:22:04 RevPi100300 systemd[1]: pimodbus-master.service: Failed with result 'signal'.
Nov 20 18:22:04 RevPi100300 systemd[1]: pimodbus-master.service: Service RestartSec=100ms expired, scheduling restart.
Nov 20 18:22:04 RevPi100300 systemd[1]: pimodbus-master.service: Scheduled restart job, restart counter is at 5.
Nov 20 18:22:04 RevPi100300 systemd[1]: Stopped Revolution Pi Modbus master.
Nov 20 18:22:04 RevPi100300 systemd[1]: pimodbus-master.service: Start request repeated too quickly.
Nov 20 18:22:04 RevPi100300 systemd[1]: pimodbus-master.service: Failed with result 'signal'.
Nov 20 18:22:04 RevPi100300 systemd[1]: Failed to start Revolution Pi Modbus master.
]0;pi@RevPi100300: ~[01;32mpi@RevPi100300[00m:[01;34m~ $[00m exit
logout
User avatar
nicolaiB
KUNBUS
Posts: 931
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: Modbus and Siemens Sinamics Communication

Post by nicolaiB »

Looks like there is a problem with your modbus action configuration. Could you please share the file /etc/revpi/config.rsc?

Nicolai
joao.pires
Posts: 12
Joined: 18 Nov 2021, 15:28

Re: Modbus and Siemens Sinamics Communication

Post by joao.pires »

Sorry, i'm a begginer on this. I only can copy this inside the file:

{"App":{"name": "PiCtory", "version": "2.0.3","saveTS": "20211118130027","language": "en","layout": {"north":{"size":70,"initClosed":false,"initHidden":false},"south":{"size":290,"initClos$

How can i copy all the line?
User avatar
nicolaiB
KUNBUS
Posts: 931
Joined: 21 Jun 2018, 10:33
Location: Berlin
Contact:

Re: Modbus and Siemens Sinamics Communication

Post by nicolaiB »

You can copy the whole file with a tools like winscp on to your local machine and then upload it here.

Nicolai
Post Reply