Can't figure out how to grab a value based on a historical time

Hello All,

I need to change my screen name to village idiot as I know this will be an elementary question.
I have created dashboards on TVs on the production floor that show the operators targets vs, where they are now with production. In this case I would like to display the number of products that the previous shift produced to create some competitive spirit. The shifts (2) end at 5A and 5P. I would like to grab that number at that point in time (4:59A and 4:59P) and display it on the dashboard for the next shift and the do the same thing every shift so the active shift can always see what the previous shift produced.

Here's where the idiot comes in...
I have no clue as to accomplish this. All of the tags have history enabled but my brain is lacking spark.
Thanks so much for any direction that you might provide.

Create a set of memory tags to store the previous shift's final production numbers. Configure a Gateway Scheduled Script to poll the db to get the total completed parts at the determined times (5PM and 5AM), and write those numbers to the memory tags. Display the memory tags on your dashboard.

Use a history binding with start and end timestamps covering the previous shift. Set return mode point count == 1 and aggregation mode "LastValue".

Be sure to calculate start/end timestamps with minutes, seconds, and milliseconds precisely zero.

1 Like

The memory tags worked perfectly! Thank you.