I have several PLCs I am monitoring various tags. When I start with about 13 tags and set them to a refresh of 200ms the tags refresh very quick and look good. However, once I add another about 173 tags, even though the refresh is set to 200ms the actual refresh rate appears to be more like 2-3 seconds.
I have tried putting like data types together, tried deleting tags in sections, deleting specific data types, and many other scenarios but so far I have not been able to pinpoint what is causing this. The only thing I can do is delete tags. The fewer tags I have closer the refresh gets to what it should be.
I am using tags inside folders and also defining the tags on an edge instance. I am not defining the tag in the PLC configuration but defining them in the designer project.
Any suggestions on what to check would be greatly appreciated.
It’s possible that the PLC simply can’t keep up with very many requests at that rate.
Look at the device diagnostics in the Ignition Gateway to see overload and response times. Or a Wireshark capture.
I have never been in the device diagnostics section but that is a good one to know about. I went in and saw the following results:
Without the added 174 tags
Sampling 100ms = Overload 594%
Sampling 200ms = Overload 300%
Sampling 1000ms = Overload 61%
With the added 174 tags
Sampling 100ms = Overload 2235%
Sampling 200ms = Overload 1136%
Sampling 1000ms = Overload 228%
I am not 100% sure how to interpret that information. Since when adding tags, all refresh interval overloads increase would that indicate a tag quantity issue, trying to refresh too fast, or something completely different?
Is there a good way to determine what the refresh rate should be or a min/max refresh rate?
Any overload greater than 0-5ish means the PLC can’t keep up. There’s a lot more info on that page that is useful - total monitored item count, request counts, response times, etc…
I just went in and changed all refresh rates to 1000ms and it sits right around 140% overload. I have attached a screenshot of the page with everything set to 1000ms.
275 tags requiring 135 requests probably means the addresses you are reading are poorly co-located. Reading contiguous addresses is better for performance.
1 Like
I have always known reading from continuous registers is faster and I did have registers scattered throughout the program because I have the PLC broken out into register groups but it wasn't 135 different groups. To test this, I set the 275 tags to read from 2 continuous blocks. It is actually saying 5 but close enough. After this the overload went to 0-1% so it definitely looks to be related to gaps in the registers.
So then the question is why 135 requests. I did some additional testing as I had a suspicion. In Mitsubishi, if you let the PLC auto assign tags to registers it will assign only the tags it needs for all data types but strings get funky. If you have an even length string, the PLC will auto assign the string length divided by two plus one. (Example: String of length 12 will assign 7 registers). If you have an odd length string, the PLC will auto assign the string length divided by two and round up the one half. (Example: String length of 11 will assign 6 registers.)
This is due to how Mitsubishi processes strings. All of the commands we can use to handle clearing, setting, checking, comparing, etc of string data will start with the starting register and then go to the first zero or null byte even though you specify a string length. I don't know why it works that way but it does unfortunately. However, knowing this, we have always had a habit of adding an extra register after every string so we don't accidently pull information from two strings that are "continuous" in register count.
With that said, I changed all strings to be 100% continuous in how registers would be auto assigned and the count went to 5 requests. This means I missed a couple but it still shows and explains what is happening.
Now seeing and knowing this means I am going to have to greatly re-think how to group everything into as few of groups as possible to interface with Ignition.
Thank you for your quick replies and the tips on finding this! I have some work to do now!