Hi,
we have a requirement to collect relational (discrete) data to central site database. The frequence of data is not high, but it happens during the same time (aligned to the cycle time of a machine).
Basic idea:
- Every line has a Ignition (edge) Gateway (Spoke) to not rely on the central components for data collection. They get the data from OPC-UA servers from the machine(s)
- A central ignition Gateway (Hub) is connected to a central relational database (for discrete data) and a historian (for process/time series data)
This works good for time series data, as the Ignition components can buffer data and sync them via the Ignition Gateway to the Historian.
But this will not work for relational data.
-
On idea is to store the data locally and replicate them via database technologies. The downside is that we required a database for every spoke only for the purpose of forwarding data to a central database.
-
Antother idea is to just add another database connection from the line Ignition to the central database:
Not sure if this is a good idea if we want to connect a higher amount of gateways to the same database which ends up in a large amount of connection. In addition we require SQL Bridge licenses for every Spoke (or SQL scripting is maybe an option)
3.Would MQTT be an alternative for the connection between spoke and hub? Publishing UDTs via MQTT to the central Ignition gateway and then writing the data to the relational data or make use of the MQTT recorder which can store relational data to a database directly from the MQTT Broker.
Is there a good way to design this with Ignition? Would be great if you can share your experience.
Thank you!
Replace Edge with Standard. Edge is explicitly built to not talk to databases. That's the number one reason it is so cheap.
"Hub and Spoke" doesn't require Edge on the spokes.
I am not completely familiar with edge restrictions, but if they allow Remote Tag Provider access you can add the tag providers of each edge node to the Central gateway and then use either scripting or Transaction Groups on the Central gateway to capture and store the data?
Okay - Edge was just an option if there is another way, without direct database connection.
If this can only be achieved with a direct database connection, than option 1 would be one which might work.
I guess that option 2 will lead to some issues when there are too many database connections to the same database.
Thank you..
This is rarely a problem with modern DBs. In fact, by default, Ignition makes a pool of eight simultaneous connections for each named DB config.
DBs with native replication capabilities will dramatically simplify your Ignition system, as the central system would connect to a replica.
This migh work. But I'm not sure how the internal queueing mechanims works, in case there is a network issue between the spoke and the hub If the connection is back, a lot of data would appear in the hub, which has to be written to the database one after the other.
Have to test this. THank you!
This approach cannot store and forward.
If it is a set number of the same tags, I would setup a storage array in the PLC with a Logged BOOL in each record of the array, FIFO shifting on the logged BOOL.
Then the transaction groups just monitor the Logged BOOL, grab the data, write it to the DB, set Logged to false and wait for it to shift.