Ignition & Logix Best Practice Tips for better communications

I've got nothing to say about scan times used in your PLC program, but yes, it's meaningless for a number of reasons when it comes to Ignition Tag Group rates and the way drivers queue requests to be polled.

3 Likes

I recently decided it was time to actually test the theories with scan rates for different structures in the PLC, and found the results below.

What I found (obviously) backed Phil's recommendations to only read UDT tags and to ensure that all members of them are set to at least read access. However what I found was negligible difference in response rate at 100ms when reading the UDT tags from within different structures (e.g. individual UDT instances at the root/controller level, addressing UDTs within an array, or addressing aliases to UDTs within an array)

Ignition request scan rate for all tests (except one): 100ms
Number of instances read: 250 (+800ish UDT tags outside of the test, however all are set to ext access = read/write)
Driver used: IA's Logix driver
PLC: L82

Test Tag Count Actual PLC Response Rate Request Count
Individual UDT instances 7845 100.39ms 20
Individual UDT instances, Scan rate set to 1ms, CIP Connection Size = 4000 6787 1.05ms 2
Array of UDT instances 7845 101.19ms 21
Aliases to each item in an Array of UDT instances 7872 100.69ms 21
AOIs with same tags as in UDTs 7899 978.20ms 303
Individual UDT instances with a single member set to External Access = None (Note: SCADA didn't actually read this tag) 7845 714ms 20

(all members set to read/write ext. access)

(all members set to read/write ext. access, CIP Connection Size = 4000)

(all members set to read/write ext. access)

(all members set to read/write ext. access)

(all members set to read/write ext. access)

Note: I think the slight difference in tag counts is a result of reading 1 or 2 fewer udt/aoi instances, but it shouldn't make much of a difference

7 Likes

This has been my (unquantified) experience too.

Even if it’s theoretically faster to have large global arrays for all UDT types, I don’t think the extra difficultly of working with those kinds of structures normally justifies it.

3 Likes

Can you share the AOI and UDT definitions you used for this?

1 Like

This should hopefully be all of them...

This doesn't include the extra UDT member I added into _M1_Vlv_Cmd that was set to ext access = None, but that's all I added when I tested this part

AB Logix Driver Test Tags.zip (5.6 MB)

Edit: I added ACD

Ignition tags:
Tags.json (4.0 MB)

1 Like

Thanks. Just needed to see your UDT defs. I couldn't explain the request count difference between the AOI and the UDT w/ 1 ExternalAccess=None member at first.

But now I see your parent test UDT is comprised of 4 sub-UDTs. Adding a member we can't read means we can't read the parent, but we can still read the 4 sub UDTs as a whole. So better than AOI, but not as good as having all members accessible.

3 Likes

Actually I added a member into one of the child UDT types, so I guess you can read the 3x other UDTs as a whole but the 4th not. I'm still confused a bit by the request count given this...

You should also test embedding the UDT inside an AOI but only reading the UDT instance and no AOI tags. I think it should read quickly too but curious.

This is great info. Thanks for the taking the time to trial!
I’m surprised by the request count for AOI access. I should see if I can get access to the results of a project I recently worked on (where AOI-only access was my first attempt and yielded very positive results, with a MUCH lower tag/request count).

Was that using Phil's driver or IA's?

@nminchin if you increased the CIP Connection Size from 500 to 4000 you would see less requests.

@Chris_Bingham that could explain some difference you saw. Or if you were using Phil's driver.

The whole test setup is still valid as a relative performance comparison between UDT and AOI access.

1 Like

I always forget about this...

Holy moly

Edit:
Updated results with tests using different CIP Connection sizes:

Test Ext Access CIP Connection Size Tag Count Sample Rate (ms) Actual Sample Rate (ms) Request Count Overload
UDTs All Read/Write 500 6787 10 45.48 14 355%
UDTs All Read/Write 4000 6787 10 10.06 2 1%
AOI Local Tags (UDT) All Read/Write 500 6787 10 50.86 14 409%
AOI Local Tags (UDT) All Read/Write 4000 6787 10 10.08 2 1%
AOI Parameter Tags All Read/Write except EnableIn/Out 4000 6787 10 519.02 33 5090%
Aliased UDT Array Elements All Read/Write 4000 6760 10 10.06 2 1%
UDT Array Elements All Read/Write 4000 6787 10 10.06 2 1%
4 Likes

Thanks Nick, this seems like it'll be useful.

Do you happen to have the L82's class 3 MSG loading for these tests?

1 Like

I broke it haha, still getting 110ms though with 29k tags!

How do I check this? (I'm not a PLC guy)

You'd enable the Webpage to see this within Studio 5000 Logix Designer in the controller properties via the Security tab and then check "Enable Controller Web Pages". You'll need to download the PLC program to get it active within your PLC. (This also needs to be a real PLC and not an emulated one)

Then within a browser, point it to your PLC's IP address and the class 3 MSG loading will be visible as "Communication" and as a percent of the total class 3 MSG under the Tasks tab.

I haven't been able to figure out what all this entails, but I believe it's how much the processor is loaded and able to respond to class 3 MSG requests; anything above 100% would likely involve some delay, but no way to determine if you're 110% or 300% overloaded from this I believe.

You're also able to get at this value via a GSV MSG, but that's a bit more complicated...

Did you get a chance to test dropping that same large UDT as a local tag into a blank AOI and seeing if reading the UDT from inside yielded the same performance? In my testing it was slightly slower, but still fast, and the reason I liked it was because now I don't have to have separate InOut parameters for my UDT tags and can just clean up the AOI by embedding the UDT internally.

250x AOIs with a UDT with nested UDTs in a local AOI tag, 100ms request rate, CIP connection size = 500:

AOI definition:

How would you use the local UDT defined inside the AOI from outside of the AOI logic? I didn't think you could access local tags from logic outside of the AOI?

All I see selectable are the two EnableIn/Out parameters.

Would you map the things you needed on the outside through to AOI Parameters?

You can't, but since I only use local UDT tags in the AOI for HMI comms, it doesn't matter. Any tags I need to use for logic are on the AOI and if I need them on the HMI, I map them inside the AOI to the UDT.

1 Like

I've found a small improvement to make in the scenario where individual tags are being read, such as when reading each AOI member individually. It looks like we're slightly over-calculating the size of each ReadTagService request, which means the requests are slightly under-filled compared to what they could be.

Not going to make anywhere near the kind of difference reading whole AOIs would, but it's still something...

edit: if anybody wants to try it, here's a Logix Driver module. It requires Ignition 8.1.46+. https://www.dropbox.com/scl/fi/tm5p51sddlgup32306tom/Logix-Driver-module.modl?rlkey=6v60ve33n5jznm38ih23rvaeo&st=f6w3igvm&dl=0

1 Like