Sign in to follow this  
Followers 0
Raj Verma

Add on Instructions help

7 posts in this topic

Hi Everyone I just started learning PLC programming? I can write down basic ladder program but now I want to write down program using add on instructions instead of writing in task>program>routine. I will be grateful if someone could put some light on this please. I am using Allan Bradley and RSLogic 5000. Many thanks Raj

Share this post


Link to post
Share on other sites
Raj, First of all, thats not really a good topic for someone who has just started programming. Secondly it would be a really tough subject to cover in a forum. Questions about it maybe, but not a how to reply. I think it might be better to discuss how the AOI is used so you better understand that and then attempt one again when you come up with a need for one. It looks like from your question that you are expecting the AOI to take place of tasks, programs and subroutines. This is incorrect. The AOI is just as the name implies - an add on instruction. An extra instruction of your design that works in addition to the instructions that come built into the processor (ie, mov, cop, etc). Now can you take an existing subroutine and put it in an AOI? Sure, but you want to be careful using this. Once the AOI is created and inserted into your program, you can only change it offline and subsequently with a download. This removes a lot of flexibility from you when making online changes. So an important thing to determine is will you ever need to change the AOI? Generally an AOI is created when you find something that you are doing repeatedly with no changes to your logic over time. Thats why I suggest waiting. It doesnt sound like you have been programming long enough to have any program modules that have been using repeatedly. I have used AOI's in the past for some of my alarm logic, and for a batching subroutine among others. The alarm logic worked well for me. It was tested logic that I put in an AOI. The batching subroutine was more of a work in progress. We would add features each project and thus add the potential for problems. We ended up getting rid of the AOI and using a simple subroutine (or program) instead. I write all this to save you some of the struggles I went through when first working with AOI's. They really should be used sparingly and carefully. When the time comes to work with one, Rockwell has some pretty good documentation covering it and you may want to look for one of the AOI's that are available from them to see how a working one is put together. At that point if you have further questions, I am sure there are plenty of people on this forum that will be happy to answer pointed questions on the topic.

Share this post


Link to post
Share on other sites
Obviously start with the manual from Allen Bradley

Share this post


Link to post
Share on other sites
Excellent advice! If you've ever written a program in C or VB, think of an AOI as a subroutine that you would use in almost every program that you write. I like AOI's, I use AOI's in every program. But... I don't use an AOI for the things that might seem like a good place for them. My motor control and motor operated valve control routines looks essentially the same for every program. Each would seem to be a good candidate for an AOI. They probably are except for one thing, if I use an AOI the person that comes behind me will have a more difficult time troubleshooting what is going on with the equipment. On the other hand, I have an AOI that I wrote for calculating gas flow through an orifice meter. It's a few hundred lines long and while I could cut and paste it into a new program every time it's more efficient to use an AOI. Especially when there is more than one meter. You would be better served to learn structured text, function block, and ladder logic than AOI programming. It's relatively easy to create an AOI but only if you know how to use the programming languages that the AOI is derived from.

Share this post


Link to post
Share on other sites
I agree with Mentor. Add-On-Instructions can get complicated and troubleshooting in them can be a pain. Rockwell have a good library of AOI which you can download and import as you require. A wide range of AOI are available for things like valve control, time sync, interlocks, inputs and many many more. Granted, I find it is often the case that they don't work quite how you want them to, especially when using them with FactoryTalk, but you have a couple of choices then. Live with it as Rockwells AOI are tried and tested, or rip them apart and change them as you require. If you are wanting to learn about them, that may be a good way to start, by taking a basic AOI and changing it slightly to accommodate your needs. You will have to remove the signature first, but worst case, you mess it all up and have to import it again. Obviously, don't put it in a live system until it has been fully tested, including trying to break it by making it do things that it shouldn't do, because you know an operator will.

Share this post


Link to post
Share on other sites
One advantage AOIs have over multiply-called subroutines is that you can view the specific running AOI whereas with a subroutine you see all of the various states as it is being called from different places in the program.

Share this post


Link to post
Share on other sites
it is useful if you want to repeatedly use same or similiar logic for different equipments or even different projects . In my case,i create a AOI to customize logic for all run/stop hours for a compressor motor. Then we use this AIO to all other motors/pumps subsequently or other projects. it make your program a bit "cleaner" and reduce amount of same coding logic. Hope this helps!

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