I am working on project where I read out modbus registers from an energy meter via Ethernet. My hardware is an Arduino Mega2560 with an Ethernet Shield 2.
The inserted libraries are: ArduinoModbus Version 1.0.3, MySql_Connection Version 1.2.0.
I can read successfully the modbus register. After reading I will connect the database. This is not possible. I seems the Modbus communication is blocking all other netowork communications. I have tried to store the data without mySql via a PHP-Scritpt, unfortunately with the same effect.
In the attachment you will find my whole code.
Has somebody experience with this stuff?
Thanks for any tipps and hints in advence.
@ Martin,
I am looking for something as you did. Is it possible to send me how everything is connected through Ethernet?
Are both machines in the same location?
Thanks
Hello
Yes I can use PHP from bowser. http is working. If I bypass the modbus part in the sketch php and mySql works. MySQL is conficured for external access. I use othe tables in the same database with the same Library and it works. Just if I use the "ModbusTCPClient modbusTCPClient(client)" it seems other connections are blocked.