ModBus TCP Master (Kunbus Beispiel)

Post Reply
Rigon
Posts: 3
Joined: 18 Jul 2023, 07:38
Answers: 0

ModBus TCP Master (Kunbus Beispiel)

Post by Rigon »

Hallo,
ich will meinen RevPi Connect nutzen um über ModBus TCP zu kommunizieren. Dazu bin ich gemäß des Beispiels auf der RevPi website vorgegangen.
Allerdings kann ich mich nicht mit der Applikation ModRSsim2 verbinden und erhalte da auch nichts.
Anbei ist ein Foto mit der Fehlermeldung auf CodeSys.
Vielen Dank für ihre Hilfe.
Attachments
MicrosoftTeams-image (1).png
MicrosoftTeams-image (1).png (400.08 KiB) Viewed 6834 times
User avatar
dirk
KUNBUS
Posts: 1948
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: ModBus TCP Master (Kunbus Beispiel)

Post by dirk »

Hallo Rigon, danke für Deine ausführliche Schilderung des Problems und die Informationen, die Du bisher angegeben hast. Möglicherweise steckt hier das Problem im Detail.
Die Fehlermeldung in CODESYS deutet auf zwei Möglichkeiten hin a) die physikalische Verbindung ist nicht intakt b) das Socket unter Linux kann nicht kommunizieren, da der Port 503 bereits belegt ist.
Kannst Du Deine Modbus TCP Anwendung unter CODESYS nochmals mit diesem Beispiel abgleichen: https://revolutionpi.de/tutorials/beisp ... rect=de-DE
Prüfe Deine Installation mit der Revolution Pi Checkliste
https://kunbus-gmbh.atlassian.net/servi ... 2147305846
Prüfe Deine CODESYS Installation mit der CODESYS Checkliste
https://kunbus-gmbh.atlassian.net/servi ... 2687893508
Schlussendlich prüfe bitte Deine Ethernet Verbindung auch hinsichtlich der Netzwerk Topologie - am besten machst Du eine Punkt-zu-Punkt-Verbindung.
Du kannst auf der Shell mit dem Befehl "sudo netstat -n| grep 502" sehen, ob und welche Prozesse den Modbus Port 502 belegen.
Rigon
Posts: 3
Joined: 18 Jul 2023, 07:38
Answers: 0

Re: ModBus TCP Master (Kunbus Beispiel)

Post by Rigon »

Hello Dirk,
thank you very much for your reply.
I installed everything correctly.
I also followed the Kunbus Modbus TCP Master example (https://revolutionpi.com/tutorials/beis ... tu-master/).
And I also checked Port 502. You can see the photo below. The IP-Address 192.168.0.50 is from my Computer. 192.168.0.15 is from the RevPi.
I tried yesterday the same CodeSys Project on a different Computer and it worked.
Today we tried the same CodeSys Project on the other Computer again. But now it doesn't work on that Computer anymore as well.
You can see below the Failure result of the other Laptop.
Thanks in advance for your reply.
Attachments
Failure result on the second Computer
Failure result on the second Computer
MicrosoftTeams-image (3).png (335.97 KiB) Viewed 6659 times
MicrosoftTeams-image (2).png
MicrosoftTeams-image (2).png (5.92 KiB) Viewed 6659 times
User avatar
dirk
KUNBUS
Posts: 1948
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: ModBus TCP Master (Kunbus Beispiel)

Post by dirk »

Hi Rigon, that's unfortunate, can you tell what I changed, and can you post an SOS report or send it to Support@kunbus.com?
Then we can take a closer look at your system. How this works, you can read here:
https://kunbus-gmbh.atlassian.net/servi ... 1062117921
You can take a look at the release notes of the Revolution Pi Library for CODESYS and this troubleshooting from Amar:
viewtopic.php?p=14383&hilit=codesysctl_user%2A#p14234
You have to edit "/etc/CODESYSControl_User.cfg" accordingly to grant access to the necessary files - it's a security feature.
Alternatively you can use the setup from Video Tutorial #20 and try to communicate using the qModMaster software for testing the Modbus Client-Server communication.
https://revolutionpi.com/tutorials/video-tutorials#VT20
User avatar
dirk
KUNBUS
Posts: 1948
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: ModBus TCP Master (Kunbus Beispiel)

Post by dirk »

Hi Rigon, there is an updated version of the CODESYS Driver regarding SP19 available. Maybe this helps!
Click here to download: https://revolutionpi.de/tutorials/downloads#driver
Post Reply