Changing values within an AOI

kf4sqb

Member
Join Date
Nov 2021
Location
South Georgia, USA
Posts
14
Hi, all!


I have a 1768-L45 CompactLogix PLC with a couple of 4-20 temperature transmitters connected to it. I have the temperature scaling working, and the desired readouts on an HMI. I am using an AOI from AB, called "Analog_Scale" to handle the scaling, and can adjust the parameters of the AOI, namely Analog_Min_In and Analog_Max_In to adjust the scaling, while online with the controller through RSLogix 5000. However, I can't for the life of me figure out how to change the parameters from within the ladder logic. More specifically, I want to be able to set up a numeric input on the HMI to be able to adjust the scaling from there. I've tried using a MOV command, and it does write the new value to the parameter file, but it will not populate into the actual instruction on the ladder, and as soon as I make the rung the MOV command is on false, the parameter file goes back to what it was before I made the MOV true. Any ideas on how to achieve what I want? Thanks!
 
If I had to guess, I'd say that the Analog_Min_In and Analog_Max_In parameters are set to Required, which means you have to assign them a tag or a constant value. If you assign them a constant value, you can write whatever value you want to them with a MOV instruction, but when the AOI is executed, it will re-apply the constant values to the parameter before executing its internal ladder logic.

If I'm right in my assumption, the best solution (IMO) is to make those parameters Visible but NOT Required, and then it will work as you expect. Alternatively, instead of using a MOV to move a separate tag value into the AOI parameter, assign that tag itself to the AOI parameter.

Some screenshots would help illustrate things in any case.
 
I see what you are talking about changing to "not required". Since it won't let me change it while in remote run, I assume that I will have to put the PLC into program mode to change that?
 
Yes, a download is required for that solution. The second solution can be done with online edits, but will need to be made to each instance.

Also be aware that if any other instances of the analog AOI are using the "required" feature by assigning a tag rather than a fixed value, you will need to modify that to provide equivalent functionality, should you take this path.

FYI once you change it to not required, you can address the parameter directly from the HMI, rather than having to write the HMI value to an intermediate tag and MOV it in. That is, your HMI can write to My_Analog_AOI.Analog_Min_In directly, and it will work as you intended once the AOI is not overwriting the value each scan any more.
 
I have it working as desired now. Interestingly, when I deselected the "required" attribute, the rung errored out, and two new fields labeled "unknown" appeared at the bottom of the AOI icon, with one mirroring the Analog_Min_In value, and the other mirroring the Max value. Once I selected the "unknown" fields and backspaced the data out of them, they disappeared, and the rung was happy. Just thought that was an interesting note. Thanks so much for your help!
 
Yep, that's expected behaviour. When a parameter is "required", it displays two data fields. The first one shows the assigned tag or constant, and the second shows the value of that tag or constant. If you're using a constant, they are of course identical.

Once you remove "required", that parameter actaully becomes a part of the AOI's data structure as opposed to a reference to an external tag, so the "assigned tag" data row disappears, leaving only the "value of the parameter" row - which now refers to the value of the parameter, rather than the value of the external tag assigned to that parameter.

So Logix pops the orphaned tags at the bottom of the AOI labelling them "unknown" since they are still part of the ladder logic, but it no longer has a AOI reference to attach them to. As you discovered, you just need to delete them and you're away. Or I believe there's a right click>remove unknown references feature in newer versions of Logix.

Anyway, long story short, I see a whole lot of people that misunderstand the "required" feature of AOI definition and misuse it badly. There are not a lot of reasons to actually use "required" - there are reasons, but in the vast majority of my AOI's, there are maybe 3-4 "required" parameters at most, along with 10-20 not required but visible parameters, and another 10-20 not visible parameters.
 

Similar Topics

Dear Experts, I'm just started working with GEO SCADA and I need your valuable help. Currently, I'm trying to edit the alarm limits on MIMIC...
Replies
0
Views
213
Be gentle, itÂ’s a first post & IÂ’m learning along the way. Have checked out this forum and search engines for answers, hopefully someone can...
Replies
2
Views
1,358
Hi again Looking to write date or time values to the RTC in my MicroLogix 1400 In the ladder logic I am using a CPW instruction as per the 1400...
Replies
13
Views
3,254
Hi, I'm working in so machine basic v1.5 and I'm wondering if it is possible to change the start time and stop time in a schedule block with a...
Replies
0
Views
1,258
Greetings PLCS.net Community! :thumb: I've been a lurker here for a little while, and I've already found tremendous value in the posts I've...
Replies
2
Views
2,194
Back
Top Bottom