Page 1 of 1

How can I put Database

Posted: Mon Jul 25, 2022 7:37 am
by seokgi
Hello?
I have a question.
I want to build a device that acquires data from an embedded board and writes it to a database on a computer.

I want to read data from the embedded board (PIC base) to Modbus and put the value into the address of a specific database (oracle or mssql) of the server computer.

Currently, we are using SCADA SW.

Is there any way to make it?

How can I make it?

Thank you.

Re: How can I put Database

Posted: Mon Jul 25, 2022 9:12 am
by Steve-Matrix
You might need to call a function in a DLL or maybe use a command-line tool (e.g. mssql-cli). I have no experience with accessing databases in this way though, so can't offer any concrete advice or examples. Perhaps others on the forum can help?

Re: How can I put Database

Posted: Mon Jul 25, 2022 9:41 am
by BenR
Hello,

If you're using a standard LAMP server setup (Linux, Apache, MySQL, PHP) then an easy way is to create a MySQL DB and access this via a PHP/HTML form. Once you have the form that can input data into your database you can do HTML posts from your embedded device. I have both a linux PC (acting as a NAS) and Various Raspberry Pis that I have used to do things like this. The PHP/HTML server can then do additional things like show results in tables/graphs etc and provide backend access to the DB via myPHPAdmin.

https://randomnerdtutorials.com/raspber ... mp-server/

https://www.raghwendra.com/blog/how-to- ... p-example/

Please note I haven't followed the above tutorials, they were the results of quick google searches.

Probably similar methods using Oracle and MSSQL but I've never used these so can't really comment.

Re: How can I put Database

Posted: Mon Jul 25, 2022 9:54 am
by LeighM
Yes, I would agree with that too.
And if you use the ODBC API in PHP you can connect with pretty much anything (Oracle, mssql or whatever)

Re: How can I put Database

Posted: Mon Jul 25, 2022 10:15 am
by chipfryer27
Hi

As you already have a database then as Ben suggests it is probably easiest to use the LAMP/WAMP setup with a simple script.

If databases etc are not your thing then you could perhaps use the MQTT/UART Component to update ThingSpeak or any of the similar Hosted offerings.

Regards