Some AOI Hackery

JeremyM

Lifetime Supporting Member
Join Date
May 2014
Location
Dallas, Texas
Posts
1,233
We’re familiar with the basics of AOIs:
  • input, output, and in/out parameters are visible and usable by the program
  • local tags aren’t. Or are they?

Try this:
  • create an AOI
  • add some local (private) tags. Set them up to be read-only or read/write.
  • create a message as a CIP typed read or write (depending on the tag above).
  • set path to ‘THIS’
  • set the tag name to be the AOI local tag.
  • the destination tag must be of the same type.
  • You may have to format the tag name to be prefixed as program-scoped: “Program:progName.AOInstance.LocalTag”
  • run that message!
  • spoiler: by using the processor’s message router, you bypass the local tag restriction.

- Now try it with tags local to another program on the same controller.
- Then try it on a remote processor altogether.
 
Last edited:
You can read local tags on a HMI or SCADA as well, provided they're not set to "External Access: None". They're not supposed to be top secret/locked down; "external access" refers only to the ladder logic. You can't address them in routines outside the AOI.

I often display local parameters on HMI's and SCADA, e.g. when displaying a fault code or fault message that has to be stored in a string - you can't set a string as an input or output parameter, and I don't want to use InOut or I have to create an external instance of my string for each instance of my AOI, which kind of defeats the purpose of the AOI.
 
You can read local tags on a HMI or SCADA as well, provided they're not set to "External Access: None". They're not supposed to be top secret/locked down; "external access" refers only to the ladder logic.
Right. I discovered recently that building a backing collection (in the form of UDTs) of sets of local tags to the AOI and pulling the UDT tag instead of each individual member is much less costly on comms.

Taking that idea further:
You can't address them in routines outside the AOI.
Not directly. With a message, you can.
I often display local parameters on HMI's and SCADA, e.g. when displaying a fault code or fault message that has to be stored in a string - you can't set a string as an input or output parameter, and I don't want to use InOut or I have to create an external instance of my string for each instance of my AOI, which kind of defeats the purpose of the AOI.
Yes, you would have to do that, or build a UDT containing AOI + string to 'encapsulate' it slightly better. I'm not particularly focused on strings, but you might be able to tackle that with the approach I'm thinking - external configuration:

In an AOI, for example, I have 'Config' and 'Data' UDTs containing setpoint and actual members like MinFrequency, MaxFrequency, and so on. Even a string member of the Data UDT is certainly possible. An external source, be it HMI, SCADA, separate 'configurator' program on same controller, or a separate 'configurator' controller, would be able to push to these AOIs in single writes with no other knowledge than what the UDT looks like. You wouldn't need In/Out parameters to achieve it.
 
Yes, that's another approach I've seen used (UDT that contains an AOI instance). I've rarely found an application where that was what I'd consider the neatest solution, but if you have produced/consumed tags in the picture, that could be one of them!
 

Similar Topics

Hi Hope you all are doing well. Iam working on a project with some AOI. I also hate no online edits... lol. My problem occurs when I use a UDT...
Replies
2
Views
71
Hi everyone, i have an issue with saving a changed value in an AOI, I am using L84E, Everytime i try to save my work to SD card, the program lost...
Replies
1
Views
64
Working with AB/ Rockwell PLCs How do I get certain outputs to show up like the picture ? The one in the picture was made by a manufacturer, but...
Replies
4
Views
192
I'd like you to meet my IO_Link Block, Fred. There are a couple of SSVs outside of Fred's AOI whose main purpose in life is to prevent me from...
Replies
2
Views
115
I am trying to connect to a Chiller through Modbus TCP that has been setup as a Modbus slave and I see the Rockwell AOI and it looks pretty...
Replies
7
Views
311
Back
Top Bottom