Hi guys, I'm running into a bit of a nuisance where I'm getting slow update speeds for my object properties bound to PLC tags.
In this case, I have a button that is triggering an output in the PLC. The PLC then sends an output back to me which I attach to a custom property on my button. I then use this property to change the "style" of my button (background color).
I have my tags placed in a "Leased" Tag Group of 250ms when Leased (present on screen) and 5000ms when not in use. My device overload is at 0% with response times of +- 10ms. The button trigger works fine and quick, I see my device actuate right away, but the color change takes forever, almost 7 seconds before my button turns green based on that PLC output.
Not sure if there is a certain way I should go about it.
You will have to change the response tag in Ignition to not be leased.
Sounds to me like if you catch it right after an update, you will be waiting the 5000ms for the response bit to update.
If you were using a single tag, you could set it to read after write to get an immediate read back.
The way I have my buttons made is as a template. Since I'm dealing with a massive project, I've made Dynamic Template Properties, that change the tag path according to the screen I'm in, this way I have indirect tag bindings that change according to what screen I have open.
For example:
My machine is comprised of 3 Cells and the tag structure is as follows: gstHMI_C{1}.pbWork.PB and gstHMI_C{1}.pbWork.pbIndicator
This structure is the same across all cells, whenever I navigate to cell 3, a number 3 is fed into that indirect tag, now referencing the push pushbuttons in that tag structure.
If my understanding of Leased Tag Groups is correct, the moment I open that screen, my template's custom "tag path" property is now bound to the tag structure according to my indirect tag binding. Therefore, it should be scanning that tag at the 250ms.
It doesn't make sense that the output (PB) is tuning on just fine and almost instant, but the indicator bit that controls the button's style property and turns it green takes longer. They are both part of the same structure.
You should be able to look on the gateway in Status -> Connections -> OPC Connections, then find the tag group and look for your status tag in the list to make sure it's in the 250ms leased rate. Or maybe easier to just right click the tag and view the tag diagnostics for it when you think it should be leased on a client to see if it really is.
This was very helpful, @MMaynard was correct, there are some tags that are not being Leased. Perhaps because I am not exactly binding to them directly but instead referencing the bits within the "number" tag in scripting.
I believe the tag will need to be bound. Best thing would be to bind to your number tag on the graphic/template/etc so that it gets leased, then reference it in your graphics by the bits of the number.
Personally, I stopped using Leased groups for the most part because the extra delay when subscriptions changed poll rates (at least when watching the device stats page) seemed a bit more work/load than just letting everything be directly polled all the time (given you're not reading an excessive number of tags from a single PLC).
I had everything originally in default group at 250ms, but this project is really big and there is a lot of Data tags that need to be monitored, all from one PLC. Right now, I am sitting at close to 4000 tags, and before using Leased Groups, my device overload was at 250%.
As @pturmel said, if this is a Rockwell Logix PLC, 4000 tags are nothing, and could just need optimized on the PLC side to get better comms. I've got systems in production with over 40k tags on a single ControlLogix PLC with 0% overload and all direct tag groups.