Report timeseries chart: issue to show raw values

I'm trying to create a report with a timeseries chart.
But I'm having trouble to show the raw values of a historian enabled tag.

This is how I trigger the report:
When the "batch active" tag becomes true, I save the start timestamp in a memory tag.
When the "batch active" tag becomes false, I save the end timestamp in a memory tag, and trigger the report.

Before the "batch active" tag becomes true, Pressure PV has value 20.
Then while the "batch active" tag is true, I change the tag value to 25 and then to 30.
Then, i set the tag "batch active" tag to false.

So:
BEFORE "batch active": Pressure PV=20
WHILE "batch active": Pressure PV=25 and a bit later 30.

But this is what the report shows:
23 -> 25 -> 0
(The tag has never been 23 nor 0.)

This are the settings:

But I tried many other settings too, but can't figure it out how to get it working properly.
I don't want to aggregate values, I just need to show the actual values between the timeframe.

These are the tag history settings:

Does anyone know how to configure this? Which changes I need to make?
Thanks in advance!

This has nothing to do with reporting. You are mis-using the historian. It isn't designed to correlate your "batch active" tag with any other tag. Or any tag with any other tag. It has no way to query your tags with conditions from other tags.

The best you can do with the historian is to query in two layers: first query "batch active" to find the time boundaries of your batches, then repeatedly query your other tags for each time span. Reporting has no tool to do this for you, but you can use a report script to construct it. See this topic if you must use this route:

But the proper solution would be to use transaction groups to record into a conventional database table using your batch active tag as a trigger. Include the other desired data as columns in that transaction group. Then you can use conventional queries to access the data for your report.

{ One other note: the historian's "wide" return format is incompatible with "as stored" results. Use tall format. }

Hi @pturmel , thanks for your answer.

I don't completely comprehend your answer though. I'm not sure how I'm mis-using the historian.

I have the start- and end timestamp available in 2 tags:

Then I let the report generate with historical data between those 2 timestamps:

So I'm not really sure why that wouldn't work?

Just take the case where the Batch_Active tag goes false and is recorded in the historian 1 ms before the PV value is read and recorded. The last PV value is 1 ms after your period of interest and so it won't be included in the results.

That's why a row format (t_stamp, PV0, PV1, PV2, PV3, etc.) is so much better and easier to work with.

1 Like