• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Storing data on a (remote) database
#1
Hi Armin,

One of our customer wants to read data from AB PLC ( Ethernet/IP ) & store/log in to netPI & then want to export the database to a server...How we can do this with netPI? Can we use SQLite node with netPI?

BR
Madhumati
  Reply
#2
Well Madhumati,

if I hear "data storage" under long term conditions I am always concerned about the durability of the default SD card memory we use in netPI. It is a NAND Flash based of type MLC and by its very nature of design it has limited program/erase write cycles (3000 p/e by the way per block).  So the question is how many data does this customer want to store on the SD card per day? Examinations about the SD cards durability were topic of another thread.

You say "to export the database to a server" ... of which type of server is this? Can the database server be defined/setup still or is it set already?

I am asking because I would not recommend SQlite but a time series database like InfluxDB instead. See here a comparison.

So the server should run InfluxDB and there is Node-RED influxdb node available to write to InfluxDB from local netPI to the remote database. So there is no need to store data locally which is good for the SD card.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#3
Is there any way to test this in office ? Can we have Influx DB server avilble on PC?
Also,Do you have any earlier experience on this?

I am trying to configure the flow, but it shows error for DB node, please check attached screenshot..

I have to demonstate this to one of our customer here. He wants to read data from AB PLC ( alarms, event etc) & log it into netPI

can you please help?


Attached Files Thumbnail(s)
       
  Reply
#4
Hi Madhumati,

you can read the data from the PLC , process the data and can write the values into a InfluxDB with Node-RED.

For the communication to the InfluxDB i use the "node-red-contrib-influxdb" Node-RED node.
You can download the InfluxDB server for Windows, Linux, Mac OS .... under https://portal.influxdata.com/downloads/


Best Regards
Patrick
  Reply
#5
Hello Madhumati,

have you already installed InfluxDB on your Windows PC 192.168.0.5? In your screen shot of InfluxDB node I see you did not enter the name of your InfluxDB database. So the question is how did you name the InfluxDB after installation?
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#6
Hi,

Ihave created a databse now Test  & also now added the dtaabase name in my flow.attached screnshot.

I could not see the data into logview...


Attached Files Thumbnail(s)
           
  Reply
#7
Madhumati, your screen shots show InfluxDB installed as www on the influxcloud.net cloud as internet service and not installed on your local PC 192.168.0.5.

So you have not installed InfluxDB in your local PC. You need to install InfluxDB as Windows Version.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#8
(May-28th-2019, 11:33 AM)Armin@netPI Wrote: Madhumati, your screen shots show InfluxDB installed as www on the influxcloud.net cloud as internet service and not installed on your local PC 192.168.0.5.

So you have not installed InfluxDB in your local PC. You need to install InfluxDB as Windows Version.

I can see as attached  screenshot herewith --Is it correct application? How I can proceed in this case?

(May-28th-2019, 09:35 AM)Patrick@netPI Wrote: Hi Madhumati,

you can read the data from the PLC , process the data and can write the values into a InfluxDB with Node-RED.

For the communication to the InfluxDB i use the "node-red-contrib-influxdb" Node-RED node.
You can download the InfluxDB server for Windows, Linux, Mac OS .... under https://portal.influxdata.com/downloads/


Best Regards
Patrick

On this link I get as below attached -Is it the correct aplication to use ?


Attached Files Thumbnail(s)
       
  Reply
#9
Hello Madhumati,

this screen shot looks good.

But after starting InfluxDB application on Windows you need to create a database first. You can name it "armin", "madhumati", "netpi" or anything else. You can have multiple databases running under InfluxDB at the same time, but all with different names. Here find explained https://docs.influxdata.com/influxdb/v1...._download/ how to proceed to create a database with a windows console.

Later - without a database name- you cannot use InfluxDB Node-RED to write to a database since InfluxDB addressing scheme including Node-RED InfluxDB node needs next to the IP address also the name of the database where to write to.

Since running a time series data base like InfluxDB under windows or other systems is of interest for others we will be providing an example how to get a InfluxDB up and running today in another thread. We will be showing how to create a database without use of a console but within a simple Node-RED and then how to access it.

Thx
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#10
I have posted a very easy Node-RED flow.
This flow can create or delete a database, write values and can read values from the database.

Link: Node-RED flow
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
Information [INFO] - InfluxDB - Time series database under Windows Patrick@netPI 0 50 May-28th-2019, 02:10 PM
Last Post: Patrick@netPI
  Fetch data from S7 PLC Profibus DP MGharat 3 28 March-14th-2019, 11:21 AM
Last Post: Armin@netPI
  Secomea Remote Acccess ballesj 1 157 May-15th-2018, 12:42 PM
Last Post: Armin@netPI
  IBM sensor data historian and analytics engine for the netPi AlexKoeMuc 0 84 November-28th-2017, 01:39 PM
Last Post: AlexKoeMuc

Forum Jump:


Users browsing this thread: 1 Guest(s)