Hi all,
tl;dr: I want to display a popup which by default, loads tag values once when it is displayed, but on the press of a button will display those tag values in realtime. Can I do this by dynamically enabling/disabling tag bindings, or is there a better way?
Detail:
I have a machine which indexes through various “rows”. Think of a filling machine where the first row might dispense a container, the second might fill it, the third might lid it, the fourth might label it, and so on. In reality there are about 40 rows, and 10 of them perform an action.
I have set up UDT’s so the information about what has been done to a particular row is tracked all the way through the machine. I am building a popup so that a user can click on any row and see all of the information for that row, e.g. they can see that a container was dispensed, it was filled with x mL of product ABC, it had a seal applied at x degrees, and so on.
There are two scenarios in which a user might use this feature. The first is to say “hey, the film on row 25 looks a bit discoloured, was the temperature a bit higher than usual on that row?” They click on that row, and at that point, I want the data to be loaded from the row 25 tags, but I do not want it to update. That is, the machine will index a moment later, and the row the operator was looking at will now be in row 26, not 25, but they want to keep looking at 25.
The second scenario is to say “hey, now that I’ve dropped the temperature setpoint for that heater, I just want to watch the recorded temperatures index past, so that I can see it slowly drop and work out when the discolouration disappears”. In this case, they will click on a row, but they will want the data to update in real time as the machine indexes, so they can see the “live” data for that row.
My idea to achieve this is to dynamically enable and disable tag bindings, so that by default, the data is only loaded when the popup is opened, and then it does not update further. Then, if the user wishes, they can press a button to re-enable the bindings and resume realtime display.
Is this possible, or does anybody have any other, better approaches?
Thanks!