Hello all,
I am looking to send data into a SQL database on my PC from a BRX PLC over Ethernet. I have zero experience with SQL and am looking for guidance on setting up a database and sending data such as timestamps to that database. Please share any links you know that would help me understand how to achieve this goal. Thank you all very much for any help you can provide.
This can be done a variety of ways. It's not super beginner level, but not super hard either, as there are countless tutorials on youtube, etc to get you going. You could install XAMPP on your PC, and that would get you a MariaDB SQL along with an Apache web server. You could use simple web scripts in PHP to post the data streams to the DB, which is how I did it last time the need arose. Or, like BobO said, I'm sure there's REST API capabilities by now, and that would negate the need to learn PHP methods.
The underlying concept I can suggest is to put all your data in a FIFO queue on the PLC (or a simple array and have a ToPost bit to show that it still needs to be uploaded) and from there grab the data strings and post them to the DB. Based on the DB server's response code, you can then determine if it was successful and move to next one, error and retry, or error and discard and move on to the next one.