ControlLogix Add-On instruction input and output behaviour Question

Join Date
Jul 2008
Location
Sydney
Posts
32
I am new to AOIs, and do not have a processor handy to test my program. I have a couple of simple questions, which I have not been able to find an answer.

For Parameter type "Input", can this be modified within the AOI?
e.g. I have a start command from SCADA, which I want to set to 0 after it has been used at the end of the AOI. Is this possible?

For Parameter type "Output", do the outputs use the last value.
e.g. I set an output bit within the AOI. Will the fault bit remain set? If I clear the bit outside of the AOI, will the AOI see it as clear when next called, or will it turn back on?

These are probably simple questions to somebody with experience in AOIs, but it is far from intuitive, and the manuals certainly do not hint at an answer.

Some might say use InOut type. I was trying to avoid InOut, as I figure the AOI itself should serve as the perfect data structure. Why should I need to reproduce most of the structure as a UDT

I would very much appreciate help in clarifying this.
TIA.
 
Input and Output type parameters are passed by VALUE, that is, a copy of an input parameter is made, and used within the AOI, then discarded. Output parameters are set within an AOI, and only the resultant value is passed back to the placeholder in the calling block.

The only way to actually modify an input parameter, is to create it as an "InOut", in which case a pointer to the actual callers data is directly manipulated within the AOI.
 
Thanks for the reply rdrast. I am curious if you have actually tried it. You have not mentioned the Output behaviuor. Here are my assumptions, and why I would think maybe the AOI has direct access to all the data within the structure.

If the VALUE is the value within the AOI data structure, then I do not see why the AOI could not manipulate it.

Checking the AOI manual there is a motor device developed. I find that there is a Fault bit that is set upon fault, and cleared upon Reset command. This would indicate that the AOI will remember the last value of the Output. If that is the case, then I must assume that the output value is stored in the AOI structure, and is seen within the AOI, most unlike the traditional function call, where an output must be passed in for the function to know its value. In which case, then the value in the structure must be able to be modified from outside the AOI as well, and passed back into the AOI upon next call, as the AOI structure is where it remembers the last value.

If the output values are passed from the structure into the AOI, then I might assume that the Input parameters could be modified and passed out. That is, that the AOI might work directly on the AOI data structure.

I might also assume that the use of "Input" and "Output" only refer to the placement of the variable on the function block when Visible. i.e. an input if visible and connected to a variable, will copy the value (PASSED BY VALUE) from the variable into the AOI data structure. If not connected, will use whatever value is in the data structure at the time. That value could possibly be overwritten from within the AOI.

My assumptions are sound based on all the information I have been able to find.
There is no way to tell without trial, and I do not have the facilities to try.

I would appreciate some feedback from somebody who has actually tried this.
 
Last edited:
I still don't have a conclusive answer to this. Can anyone please confirm or deny my assumptions? rdrast obviously has a good understanding of this, but the answer did not fulfil my understanding.

Let me take the long wind out of my question. It seems I can go on with my meaning being lost.

1. Are the AOI outputs retentive?

2. Is the output value stored in the AOI data structure?

3. If yes, then if the output value is changed from the main program, would the AOI see this change.



I would very much appreciate if somebody could give an answer.

The seimens method of STATIC variables is soo much better.
 
Last edited:
Inputs are READ ONLY VALUES that are passed into an AOI. While you can manipulate them, the manipulated values are not passed back at all to the caller.

Outputs are WRITABLE VALUES in the AOI, and when the AOI has finished execution, the final state of the OUTPUT VALUE is COPIED into the output parameter(s) of the caller.

InOut are WRITEABLE VALUES in the AOI. The AOI can manipulate and change these parameters, and as each parameter is changed, the respective outside-AOI tag value is also changed. The final value is not 'Passed Back' as an output. Additionally, with InOut parameters, an external device (controller or HMI for example) can potentially change the value during the actual execution of the AOI.
 
rdrast said:
Inputs are READ ONLY VALUES that are passed into an AOI. While you can manipulate them, the manipulated values are not passed back at all to the caller.

Outputs are WRITABLE VALUES in the AOI, and when the AOI has finished execution, the final state of the OUTPUT VALUE is COPIED into the output parameter(s) of the caller.

InOut are WRITEABLE VALUES in the AOI. The AOI can manipulate and change these parameters, and as each parameter is changed, the respective outside-AOI tag value is also changed. The final value is not 'Passed Back' as an output. Additionally, with InOut parameters, an external device (controller or HMI for example) can potentially change the value during the actual execution of the AOI.If it does happen mid execution, what is the state of the AOI? Will it come up with a fault flag and stop execution??[/QUOTE]
If not, will it go on and finish up business as usual with the last known (While starting execution, regardless of the last change) value used for the InOut?
I'm setting up a project with AOIs , just wanted to make sure I get all of it straight to avoid headaches!
 
Thanks rdrast. Great answer. I appreciate your time.

I would interpret that to answer my questions
1. that would be yes, outputs are retentive (remembers output value from last call)
2. & 3. are NO, as the value is stored within the AOI memory, and only the result copied to the output data structure.

Would that be correct?


To bkottaras, it would not be an error for SCADA or HMI to change a value mid execution. This can happen anywhere in a PLC program, and you should allow for this in your scan order.
eg, use a command bit once, then unlatch after use. Use CPS instead of COP to avoid variables changing mid copy.
 
You have to define what you want the tags to do. You can define this through two different routines:
  • Prescan routine - executes prior to first scan
  • EnableInFalse routine - executes when instruction is false
Remember, data stored in memory is always retentive. It's the logic and the instructions themselves that determines if the data is reset.

For example a tag called Motor1 acts differently if you use an OTE versus an OTL. It isn't the tag that affects the data, but the logic instruction. The EnableInFalse resets on an OTE, but doesn't not exist for an OTL.

OG
 
Operaghost said:
You have to define what you want the tags to do. You can define this through two different routines:
  • Prescan routine - executes prior to first scan
  • EnableInFalse routine - executes when instruction is false
Remember, data stored in memory is always retentive. It's the logic and the instructions themselves that determines if the data is reset.

For example a tag called Motor1 acts differently if you use an OTE versus an OTL. It isn't the tag that affects the data, but the logic instruction. The EnableInFalse resets on an OTE, but doesn't not exist for an OTL.

OG
I understand the tags and scan issues.
I've looked into the EnableInFalse Routine as well.
Thanks!
 
bkottaras said:
execution of the AOI.If it does happen mid execution, what is the state of the AOI? Will it come up with a fault flag and stop execution??[/QUOTE]
If not, will it go on and finish up business as usual with the last known (While starting execution, regardless of the last change) value used for the InOut?

InOut parameters can change at any time, and will not raise any fault flag if they change during execution of an AOI.

If the design of your AOI requires both InOut parameters, and also requires that they not change during the execution of the AOI, then buffer the paremeters internally to the AOI, and use the bufferred copies for logic solving.
 
I Proved my theory.

The output parameters can in fact be changed from outside the AOI, and the value will be copied into the AOI.

Efectively, Outputs can be used as IN/OUT without using inout varaiable.

Input parameters however are only copied into the AOI. Any changes withing the AOI are not copied back to the structure.

You can use the output parameters as your SCADA command bits and setpoints. The AOI could then reset the command bits at the end of the AOI, and setpoints can be limit adjusted.

It just does not seem right to use output parameters as SCADA inputs, but it is a simple method without creating a separate SCADA_Commands data structure to pass as InOut parameter.
 

Similar Topics

I am trying to add 9 DINT values with the CPT instruction in ControlLogix and I keep getting errors. I am just choosing each tag with an add...
Replies
13
Views
2,305
Good Morning , I am getting ready to install a Banner IVU Plus BCR in a ControlLogix . It seems like it is easier to install the IVU Plus...
Replies
0
Views
1,408
Hey Guys, I have an installation that has been running for about 3 years and recently some totalizer issues have started creeping up. I have a...
Replies
79
Views
26,891
I have been using RS5000 for sometime now, since ver 11. Ver 16, now has the neat "add on" function. I have just started playing with this, and...
Replies
3
Views
6,201
Why does the controllogix redundancy modules use a single mode fiber vs multimode fiber?
Replies
1
Views
55
Back
Top Bottom