Posted 21 Oct 2019 (edited) 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 21 Oct 2019 by Guzz Share this post Link to post Share on other sites
Posted 22 Oct 2019 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