Guzz

Change CIP Service Code

2 posts in this topic

Hi all,

This is my first post here, I read through the FAQ, searched the Allen-Bradley forum and this one for my question but couldn't quite find what i was looking for.

My main questions is: Is it possible to programmatically change the service code of a MSG instruction? 

It is possible to change the class,  instance and attributes but the application I'm currently writing would be a lot simpler if all I had to create is one instance of the MSG block (and its data) . The only thing stopping me is the service code.

 

Edit: I'm using a CompactLogix 5380-L306ER

 

Any input is greatly appreciated!

Edited by Guzz

Share this post


Link to post
Share on other sites

I received an answer on the allen-bradley support forum:

Quote
jjstraight said:

No,  you cannot change the service code at runtime.  Your only option is to set up multiple MESSAGE tags.  And if you haven't found out yet, MESSAGE type tags must be controller scope, not an AOI local or program local tag.  Unfortunately, they can't be arrayed either.  You'll need to pass all of the MESSAGE tags to your AOI and do some logic in the AOI to select the one to use.  If you're only planning on one AOI instance, you might be better off to separate the code into it's own program or task, rather than go the AOI route

He included a link but it doesn't seem to work: https://rockwellautomation.custhelp.com/app/answers/detail/a_id/675525

Topic can be closed.

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