Can you post some sample data?
ofc i use debeaver to read the values and workbench for setting the Mysql. All values are been thrown here. Do you have Experience with Mysql databases and how to set them correct?
That looks like built-in tag history logging, not a scheduled snapshot that was recommended.
i dont know how to set it. I think it has to be set up from ignition and not from Mysql , in SQlite you set it from SQlite. Can you guide me how to fix this ?
Do you have the sql bridge module?
Ignition SQL Bridge Module | Powerful Transaction Management Software (inductiveautomation.com)
I can show you how to use that, but notice it's a Trial
, so it will only work during your 2-trial window. Is that okay? Otherwise, you can do it with a gateway timer event or schedule event.
we bought the licence but im waiting from our system administration to set the system on a new Server that we also bought and we wait for the Delivery. Its ok i reset it every 2 hours because we are still in testing phase for our project. Ignition will be used for monitoring of 30-40 Solar plants.
Perfect, check out transaction groups that are provided by that module. They can auto create db tables and auto prune them.
About Transaction Groups Video at Inductive University
Thank you Hayes , im joining a meeting now i will check it later and i will keep you posted. Thank you for you interest in helping me.
Hi Hayes , i manage to store the value and cleared the table. you can also see the timestamp.
What i need now is to pull the daily Cumulative Energy out of the Total. So each day i have to get a value when the solar plant stops Producing .
Something like
SELECT
max(ThreeHatsCumulativeEnergy) - min(ThreeHatsCumulativeEnergy) as total,
date(t_stamp)
FROM
ThreeHats1_3MW
WHERE
date(t_stamp) = curdate()
GROUP BY
date(t_stamp)
Is it possible to create a tag and write this script , the reason is that I want to make it as a Tag because i want to Log the Daily Cumulative Energy .
-
Create a new tag called
energyStart
or something. -
Setup a gateway scheduled event script that writes your cumulative energy value to the energyStart tag (memory tag).
-
Create an expression tag that subtracts the previous two tags
It's very unlikely that you need a tag.
Instead create a named query using dkhayes query but modified to take a date parameter for the day of interest.
SELECT
max(ThreeHatsCumulativeEnergy) - min(ThreeHatsCumulativeEnergy) as total,
date(t_stamp)
FROM
ThreeHats1_3MW
WHERE
date(t_stamp) = :dayOfInterest
GROUP BY
date(t_stamp)
Set the named query to return a scalor value. (That will just return a single value rather than a row.)
Then anywhere you need to see the energy for the day you create a query binding using the named query and provide the date from a datepicker or whatever.
Hi Mate , i found another solution, i dont know if this is correct now,
I made a Transaction Group
i made a Query tag
With this Query Script.
So each day that passes it takes the last value. Because it is a solar plant , i do this in the Night where there is no Energy Production.
So the next morning a new log will start
What do you think about this solution ?What problems my occur from your experience?
I have done the test every 30 mins and it works.