How can I put Database

For general Flowcode discussion that does not belong in the other sections.
Post Reply
seokgi
Posts: 164
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 5 times
Been thanked: 6 times

How can I put Database

Post 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.

Steve-Matrix
Matrix Staff
Posts: 1234
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 167 times
Been thanked: 277 times

Re: How can I put Database

Post 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?

BenR
Matrix Staff
Posts: 1706
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: How can I put Database

Post 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.

LeighM
Valued Contributor
Posts: 394
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 69 times
Been thanked: 208 times

Re: How can I put Database

Post 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)

chipfryer27
Valued Contributor
Posts: 1109
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 278 times
Been thanked: 396 times

Re: How can I put Database

Post 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

Post Reply