Chart with calculations

Hi everyone, sorry if this comes off as confusing and vague…

I’d like to create a chart and/or calculation page. The user will have to enter some data manually (volume of wood in cubic feet as well as the target value). The tank volume comes from a historical tag already stored in a database. I will convert the volume of oil and wood into a pounds per cubic foot value.

Question 1: I need to calculate the volume based on triggers using bits from the PLC but is there a way to make the dataset persistent but also disposable? I don’t need to store the data forever in a database, but I do need to keep it for an indeterminate time, up to about 50 hours, for each batch, as well as when the operator changes pages. Once the batch is done, the data can be discarded.

Question 2: Is there a way to get a subset of data from the dataset that the graph is using (Easy chart plotting volume over time, if this is unnecessary or cumbersome, I am open to suggestions)? Ideally the start date of the subset would be triggered by a value in a different tag and the end date would come from a bit in the PLC, specifically when the batch enters the last step.

To make the dataset persistent you can use a memory tag of type dataset, then update / dispose of with tag change scripts.

I don’t know of a straight forward way to do this, but you could recreate the same data subset with scripting probably.