AB AOI design Inputs, Outputs, or InOuts?

abishur

Member
Join Date
May 2012
Location
Texas
Posts
47
I'm going through and cleaning up my AOIs / remaking some of them from scratch, and I've been trying to decide if there's any benefit to making all my tag InOut parameters vs normal inputs and outputs.

I don't allow any access to tags internal to the AOI itself, anything that needs to be read from it or written to it is done by having an accessible tag external to the AOI that is passed in / written to from the AOI.

So in theory, using a standard Input or Output tag means I have a tag external to the AOI, that has its value passed to a second identical tag inside the AOI, whereas an InOut parameter is passing a reference to the external tag's memory location into the AOI.

That means I should see a nice decrease in the size of the AOI by switching to InOut parameters, right? Except I did a sample AOI and it only saved me 8 bytes, and that was with 52 parameters (which yes, will not work on firmware revisions greater than 28)!

What's more is that my overall program size actually increased by 1,796 bytes šŸ™ƒ. This is the exact same program with the only difference being this one instance of this one AOI.

Can anyone explain what I'm missing here? On paper I should be seeing nice memory usage savings, but instead I've seen a bump.
 
I can't comment on the inner workings of the processor's firmware, but if just using In/Out parameters were advantageous, why did they provide pass by value parameters, Input & Output ?

I would just use Input and Output, unless it's a tag type that forces me to use In/Out.
 
Ad daba says the main reason for using InOut addressing is if you can't use input or output.

Any time you want to use a structure or something funky like another AIO you need to do it. Its also handy if you want to process a large amount of data in place (eg sorting). It also allows doing tricky things like passing an array of arbitrary size and configuring the AIO on the fly using the SIZE command.

I sometimes pass a structure that has machine status information as well as standard commands that is passed to all to AIO to reduce the complexity of the interface

Who knows if it actually reduces the load on the PLC not having to copy the data, but it pleases me to think it is less expensive.
 
Last edited:
if just using In/Out parameters were advantageous, why did they provide pass by value parameters, Input & Output ?

Actually, that makes a lot of sense, I mean if using a Phillips head screwdriver were advantage then why provide flat heads, and hex, etc? Horses for courses as they say.

But I don't really want to debate the merit of one type other the other (please let's not debate that :ROFLMAO: ). I'm just curious if anyone knew the why behind the scenes?
 
.... (please let's not debate that :ROFLMAO: ). I'm just curious if anyone knew the why behind the scenes?

There's lots I could be curious about - for instance why is an .ACD file at least 4 or 5 times bigger than the equivalent .L5K file ?

But I don't let things like that bother me, it gets in the way of real work.... :rolleyes:
 
Input and Output parameters are passed by value, so the value cannot change in the AOI during the execution of the AOI. They must be atomic data types.

InOut parameters are passed by reference, so they can change during the execution of the AOI (If you are running multiple tasks or are passing IO data). InOuts are meant for arrays and structures. They should be buffered in the AOI to maintain data consistency.

At least that is my understanding :)
 
Hi Mike, thanks for your informative response there. Im working on some AOIs and doing just that, passing i/o data through structures and arrays. I only have one concern about what you said:

"They should be buffered in the AOI to maintain data consistency."

Forgive me as im treading in somewhat unknown waters, how would I buffer it internally in the AOI?

I am learning to and setting up (at the same time) a UDT to match an AOI's parameters and have all inouts for everything thats not local to the AOI. Ontop of that I also have to safetymap alot of it as its a compactguardlogix project.
 

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
59
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
62
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
191
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
114
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