includeBoundingValues Not Working

I'm trying to get the tag history in a period of time and I need the value we had on the startDate to be included but I keep getting the data only after the first value change within the time range.

The Deadband style on the tag is Discrete and the mode is absolute on the history settings.

I though the includeBoundingValues would take care of that but it seems to be doing nothing, am I missing something?

This is the code I'm using:

system.tag.queryTagHistory(paths=paths, startDate=startDate, endDate=endDate, noInterpolation=False, includeBoundingValues=True, aggregationMode="LastValue")

I've tried changing these parameters and adding others but I've had no luck. Any ideas?

I thought the same and was rather disappointed! Bounding values are not interpolated / extrapolated and calculations based on the results can be misleading. I never found any good documentation on how the retrieval works internally.

I found Historian OK for general trending and useful for checking back on what happened at a certain time. For anything like production reports I recommend doing your own history. We logged each machine with a gateway script running on the hour and every 15 minutes as well as on status change of the "running" tag. With columns for t_stamp, running, cycle count1, good parts count, SKU (recipe) and FirstOutAlarm we were able to generate excellent historical and realtime views.

1 A never-resetting counter.