Hello,
I'm just getting started with the Raspberry Pi revolution for a school project, and I'm eager to know if there are any examples in C or C++ (preferably C++) for managing IO, Modbus as a network master.
Can you please help me ? i don't know where to start.
Regards
Getting started
Hello cerberus78, that sounds exciting, a school project. It's helpful to have a few good examples in stock. The best place to start is with the video tutorials #20, #21, #22 and 23 on Modbus: https://revolutionpi.com/en/tutorials/v ... rials#VT20
Then of course you can work with C/C++ and use the video tutorial #13 - there is also sample code in the download area: https://revolutionpi.com/en/tutorials/v ... orials#V13
If you like working with Python like I do, I can recommend the gateway tutorial - create an application with less than 10 lines: https://kunbus-gmbh.atlassian.net/servi ... 2379186179
Code examples and a helpful Arduino Modbus RTU coupling can be found here:
https://revolutionpi.com/en/tutorials/downloads#coding
Then of course you can work with C/C++ and use the video tutorial #13 - there is also sample code in the download area: https://revolutionpi.com/en/tutorials/v ... orials#V13
If you like working with Python like I do, I can recommend the gateway tutorial - create an application with less than 10 lines: https://kunbus-gmbh.atlassian.net/servi ... 2379186179
Code examples and a helpful Arduino Modbus RTU coupling can be found here:
https://revolutionpi.com/en/tutorials/downloads#coding
-
- Posts: 22
- Joined: 06 May 2024, 20:24
Thank you very much for your reply, also i have a second question, is there a build in library to manage modbus ? or we need to install common one (apt-get install libmodbus-dev)...
Thank you
Thank you
Last edited by cerberus78 on 07 May 2024, 12:13, edited 1 time in total.
Hi cerberus78, well, Modbus works like a charm with the Revolution Pi, just take a look at the video tutorials #20-23
https://revolutionpi.com/en/tutorials/v ... rials#VT20
https://revolutionpi.com/en/tutorials/v ... rials#VT20
-
- Posts: 1
- Joined: 15 Jan 2025, 11:35
Hallo Dirk,
ich bin ebenfalls am Zugriff per C/C++ interessiert. Die Links oben führen aber nur noch auf eine generische Einstiegsseite "RevPI Documentation". Dort im linken Menü findet man zwar die Kategorie Tutorials und dort die Abschnitte "I/O Programming" und "Application Examples", aber in beiden findet man nurmehr Beispiele zu Node-RED, Grafana oder Python. Nirgends ist die Rede von C/C++ Beispielen.
Schlau wie ein Schaf habe ich dann euren YT-Kanal gefunden mit den alten Videos von Dir. Darunter aber auch kein Video zu C/C++. Die oben zitierte Nummerierung von Tutorials (#13 für C/C++, #20..#23 zum Thema Modbus) korrespondiert aber ebenfalls nicht mit den Videos in der YT-Playlist.
Gibts dazu noch was? Hab ich was übersehen??
Gruß und Dank,
#timo
ich bin ebenfalls am Zugriff per C/C++ interessiert. Die Links oben führen aber nur noch auf eine generische Einstiegsseite "RevPI Documentation". Dort im linken Menü findet man zwar die Kategorie Tutorials und dort die Abschnitte "I/O Programming" und "Application Examples", aber in beiden findet man nurmehr Beispiele zu Node-RED, Grafana oder Python. Nirgends ist die Rede von C/C++ Beispielen.
Schlau wie ein Schaf habe ich dann euren YT-Kanal gefunden mit den alten Videos von Dir. Darunter aber auch kein Video zu C/C++. Die oben zitierte Nummerierung von Tutorials (#13 für C/C++, #20..#23 zum Thema Modbus) korrespondiert aber ebenfalls nicht mit den Videos in der YT-Playlist.
Gibts dazu noch was? Hab ich was übersehen??
Gruß und Dank,
#timo