Sign in to follow this  
Followers 0
clementcbc

String constants in Addon Instructions

3 posts in this topic

Hi Guys, Found this annoying "feature" in RSLogix 5000. I'm using V17. Wondering if there is a smart way around it. I created an Addon instructions, which uses a strong constant. But because RSLogix can't really handle string constants, i defined a tag ConstStr = "Blah". Then I used that addon several times (creating several instances). When I was debugging, i found that the ConstStr was wrong. So I changed the Definition of ConstStr from "Blah" to "SomethingElse". The annoying thing is that all currently used instances of the AOI still has ConstStr = "Blah", even though the definition is "SomethingElse". BAD. But new instances of the AOI has "SomethingElse". GOOD. Now, I understand why it does it. Because each instances has it's own memory, and the memory is not updated. I was just wondering if anyone has a smart method of overcoming that? It's just annoying to need to change every instance whenever I update the Definition. Certainly doesn't give me confidence that future changes I make, or someone else makes will be reflected in all the instances. Thanks!

Share this post


Link to post
Share on other sites
As i understand it, An Add- On's tags are their own set of tags, created specifically for the instruction and only 'seen' inside the instruction. you will have to change each manually. If the add on is the same as the rest, change one and replace the whole add on in the rest of the instances.

Share this post


Link to post
Share on other sites
Just as I suspected. Thanks for your help. Do the Local Tags in the addon reset to 0 each time I use it? Or do I have to reset them everytime manually myself? I'm used to C programming where local variables don't retain their values... Thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0