ControlLogix AOI Constants

devo.xx

Member
Join Date
Jan 2013
Location
Edmonton
Posts
69
Working with AOIs, I want to create a Tag that has a constant value. I see that "Constant" is greyed out for all Locals.
Is the only way to make it a constant is to write a rung with a simple MOV? Or is there some other setting I need to set to create constants?

Logix Designer 21.03
ControlLogix 1756-L71 21.11
 
Create a Local tag and assign a 'Default' value.

But that's only a default.
If I accidentally add something else to my AOI, say another MOV, or ADD (etc.) then I can overwrite it.
With a constant, at compile time, the program will report that I'm trying to change it, sort of a safety.
 
OK, I guess I've never had the need arise for special protection of that nature.

It's just a sanity check really, incase I "fat finger" the tag in the drop-down dialog.
Just seems really strange that you can't mark them as Constant, even though the box exists....
 
Make Input and check the Req. box then enter the value in the instance

If you make it an input parameter and check the Req. box in the AOI, then in the instance of it in your code, you will get the ? looking for a parameter reference. instead of putting a tag reference in there, just put the value you want for the constant. This is how I do ranges for my AI AOI's and it works nicely.
 
If you make it an input parameter and check the Req. box in the AOI, then in the instance of it in your code, you will get the ? looking for a parameter reference. instead of putting a tag reference in there, just put the value you want for the constant. This is how I do ranges for my AI AOI's and it works nicely.

Yep, this is what I was looking for.
Still seems kind of silly that I can't just set it in the Parameters Tab...
 
Since nothing is truly un-alterable by the programmer (even constants and hard coded values can be changed) just use a local tag and default value. If you think you might forget and change it then name it CONSTANT or DONOTCHANGE to draw attention to the need to leave it alone.
 
I usually name mine const_xxx and use a MOV statement in the first rung of the routine it's used in to set them as hardcodes. Has worked well for me.
 
Just how far do you go to prevent a "fat-finger" occurrence ?

Hard-code it in the AOI.. MOV xxx Constant, the AOI code can't be changed online, so it will be protected.
 

Similar Topics

Hello, I was wondering if anyone has a ControlLogix block or routine for encoding and decoding base64. I figured I would ask before diving into...
Replies
1
Views
279
Hi Guys, I just wanted to ask regarding to an error that we got troubleshooting the PLC system. Everything is working well then we tried to add a...
Replies
15
Views
5,381
Hi Guys, I just wanted to ask regarding to an error that we got troubleshooting the PLC system. Everything is working well then we tried to add a...
Replies
0
Views
1,011
I've worked on a handful of projects that relied on a Prosoft module for Modbus comms with other systems (older PLCs, boilers, chillers, much...
Replies
5
Views
2,173
My company imposes programming standards and insists on using AOIs for AI, AO, DI, DO points. I like AOIs and use them as subroutines when I have...
Replies
10
Views
3,117
Back
Top Bottom