Retaining the contents of a string array in an AOI

TheWaterboy

Lifetime Supporting Member + Moderator
Join Date
May 2006
Location
-27.9679796,153.419016
Posts
1,924
I'm creating a simple AOI for text display of Valve position feedback. i.e. Open, shut, opening ,closing, alarm etc.

I created it a while back and when I tried it just now the contents of the string array was blank. I seem to recall that was an issue, you couldn't store the contents of the array in an AOI, just the structure.

That sound familiar? Is there a workaround or different way to accomplish this?
 
I haven't found a restriction when creating AOI local tags so creating a string is not problem. If you want an HMI to display it, you'll have to copy it out to a controller or local program tag. The displayable string would be an InOut parameter to the AOI and the AOI's logic would copy its created string out to that parameter. Do you need an example?
 
How was the original data populated into the AOI? just manually entered?

Trying to remember but I think if the information is originally just in the AOIs tags but the AOI has no mechanism to generate the data then it can be cleared by some events (downloading or creating a new instance of the AOI).

this would mean you would need to create an external routine that populates the AOIs on the 1st scan or add internal logic to the AOIs to generate the information themselves.

in the AOI definition there is a "local tags" tab one of the items for each tag is "default", you should be able to set the initialization values here.

the next tab is "Scan modes", I think you can create a pre-scan routine in structured text even if your main AOI is ladder. structured text is better for strings and should let you generate the strings on first scan.
 
That's not true. AOI local tags have read write access and can be read and written by HMI. You just have to set to external access.

I thought that was true and but I can't seem to enable the external access - its ghosted out. (ha found it, had to dig a little)
 
Last edited:
If you want to populate the strings with constant data you need to set the default value of the local tag before you instantiate the AOI
 
If you want to populate the strings with constant data you need to set the default value of the local tag before you instantiate the AOI

Not necessarily. You can update values afterwards. It's a little hard to find. But in the AOI, under logic, look in the upper right corner. You will see a drop down. There you can update values for all or specific values. But yes, when you add a new AOI those default values are used.
 
Sorry Guys, I'm not getting notifications of replies.
How was the original data populated into the AOI? just manually entered?
Just entered into the string array within the AOI as static values (though I didn't tick the constant button...)

If you want to populate the strings with constant data you need to set the default value of the local tag before you instantiate the AOI
That's what I have done by filling out the values in the string array that is part of the AOI. Or that's how I thought it would work, I'll look at that again.
But it appears that the contents of the string array get left out when the AOI is exported (or perhaps when imported) .
 

Similar Topics

Hello PLC friends. I've been going through a saga of diagnosing and fixing an old PLC setup that I inherited. I am learning as I go. Initial...
Replies
14
Views
331
Hi everyone. I have an issue with an Allen Bradley PLC model 1769-L30ER. This PLC had a previous program with a different IP address but when I...
Replies
4
Views
523
I have an L33ERM Compact PLC that every time I go offline from it, I lose all my string values.. so if I need to make a change (IE adding an array...
Replies
10
Views
1,425
Hello, I am tasked to update a CompactLogix PLC program on a live system. The updates I need to make involve changing a user-defined data...
Replies
9
Views
2,094
HI everyone. I have a Micrologix 1400 paired with a PV Plus 7. What is the "best" or "correct" way to change setpoints and have them retained...
Replies
4
Views
2,449
Back
Top Bottom