Main Site Documentation

Project - Modbus RTU library (device and master) for Medusa (Gadgeteering)


#1

I just posted Modbus RTU library (device and master) for Medusa (Gadgeteering) on Codeshare. Feel free to discuss and make suggestions here.


#2

Hello Reinhard,
I’m trying to use your ModbusRto client on the FEZ Medusa mini mainboard.
I’m a newbie in Arduino C++ and I have no idea how to instantiate and retrieve the callCallbacks of the client in the Arduino loop{}.
Can you please give an example?
Kind Regards
Roland


#3

@ RoSchmi - You can find my whole source Code here:
https://www.file-upload.net/download-12336246/MedusaTest.zip.html
It uses the ModbusRtu device lib and the N18 Display by the GHI library.
I did not finish this, and I havn’t work on it for years, so happy digging :smiley:


#4

@ Reinhard Ostermeier - Thanks for the link, however this download page is a little bit curious. The page has redirects to suspicious looking pages and wants me to download and start an .exe file. I’m not willing to do that. I’ll send you a direct message with my e-mail address. I’d be happy if you could send me a zip of the source code.
Kind regards
Roland


#5

Well, like on all file share platforms the download button you are looking fore is well hidden.
I made an upload to my own Webspace now:
http://aarpg.net/downloads/MedusaTest.zip


#6

@ Reinhard Ostermeier - got it, thanks.


#7

@ Reinhard Ostermeier -
Hello Reinhard, it’s not so easy for me (C++ beginner) to dig through your code but I think that I can learn a lot. However, in your .zip I found only the libraries Program.cpp and ModbusRtu.cpp. It would be helpful to additionally see the Arduino Sketch ( .ino file) to see how the functions are called and how the messages are read to be used in the main program.
Another question: Did you use the Arduino IDE for programming ? Which means did you use for debugging?


#8

I think I used VIsual Studio with some Kind of plugin.
The only files I dedited are included in the zip. All you Need is there.
In short: you implement the callback Interface I have created in proghram.cpp and implement it’s functions.
How the .ino stuff calls any other stuff I don’t know. This Project was the 1st and last time I used Arduiono.
It’s hottible stuff.


#9

@ Reinhard Ostermeier - Thanks, you propably used the Visual micro plugin. Then I’ll try this too. The Arduino IDE without intellisense and breakpoints is really hard for someone beeing used to program C# with Visual Studio.


#10

About MedusaMini and Debugging:
You can’t. it’s not supported (I guess).
Also there is only one UART.
So as soon as the program runs, the UART is used for the MODBUS RTU.


#11

Got it running, works great!
Made a project to show how it can be used from an Arduino Sketch.
https://www.ghielectronics.com/community/codeshare/entry/1102