Hello everyone. I’m new to Ignition so please excuse the question if there is a simple answer. I’ve tried to see if there is a similar question or documentation somewhere but I haven’t been able to find anything yet.
I am creating a dashboard for operators on a manufacturing floor. This dashboard will give them various efficiencies and rolling averages or values over the course of 10 minutes, 1 hour, and 12 hours. For example, how many units were made in the last 10 minutes. I would do that by taking the current value of the PLC and subtracting the value from 10 minutes ago.
I would be doing this for a number of values, so I would rather not create tags for each of these values. I would like to do the calculation in a script and display the value in a numerical label. The calculation would be using only 1 PLC tag at a time.
What would be the best way to go about doing this?
To get the tag history I can use system.tag.queryTagHistory and select just the value that most closely matches 10 minutes ago and subtract that from the current value. How would I display that value? Where would I need to put that script? I tried putting it in the propertyChange component scripting, but I don’t know how I would then change the value displayed.
Thanks for your help. Looking forward to learning from you all.
- Nathan