RSLogix5000 Add-ons

ceilingwalker

Lifetime Supporting Member
Join Date
Mar 2010
Location
Phoenix, AZ
Posts
1,586
Hello. I have a program I was given and it contains add-ons. Although I have experience with RSL5000 I do not have experience with add-ons. Could someone please explain so a simple mind can understand, just what an add-on actually is? I tried to attach even a .zip of my project but it exceeds forum limits. Thank you
 
An add-on is a piece of reusable code packaged into an instruction. Imagine if you wrote a chunk of code to filter an analog input signal. Writing that code once would be easy. If you used that chunk of code on every analog input you had, you would need to write that logic several times over. That would be time consuming. The add-on instruction would let you write the code once and save it as an instruction to be used in other places for other analog inputs.
 
Imagine that you have developed a section of code for a given purpose, let's say starting, stopping and monitoring a motor for example, that you would like to use for all your motors. You select, copy and paste it into each new place that you want it, changing tag references as needed. An AOI automates that process.

An Add-On Instruction (AOI) would be that section of code but with no specific tags defined. You let it know what type each tag is and write the logic. But, in the end, it is a template.

When you actually want to use it with real information you put it in place just like any other instruction. You fill in the actual tags it will use as inputs and which tags it will affect as outputs.

Sometimes a tag provides information and is affected as well. In that case it is defined as an In/Out tag. This is also used if the tag type is not one of the standard low level (atomic) types (BOOL, SINT, INT, DINT).

That's it, remember, the AOI is a template for an instruction (just like the definition of a BOOL, SINT etc is a tag template). Once it is imported or created the AOI will appear in the list of instruction types which you can select.

Just as when you want a new DINT tag you create a unique name and declare it to be of that type, the AOI, once you choose it, requires that you give that particular 'instance' its own unique name.

[I'm obviously a little slow. Definitely get and read the manual.]
 
Last edited:
Awesome guy's, and thanks for the link to the manual. When I searched for it earlier, all I found was a 15 page book that was of little help. :)
 
I found this in an old manual:
Add-On Instructions are available beginning with RSLogix 5000 version 16
software. Add-On Instructions are custom instructions that you design and
create. With Add-On Instructions, you can create new instructions for sets of
commonly-used logic, provide a common interface to this logic, and provide
documentation for the instruction.
Add-On Instructions are intended to be used to encapsulate commonly used
functions or device control. They are not intended to be a high-level
hierarchical design tool. Programs with routines are better suited to contain
code for the area or unit levels of your application.
These are some benefits to using an Add-On Instruction.
• Reuse code
– You can use Add-On Instructions to promote consistency between
projects by reusing commonly-used control algorithms.
– If you have an algorithm that will be used multiple times in the same
project or across multiple projects, it may make sense to incorporate
that code inside an Add-On Instruction to make it modular and
easier to reuse.
• Provide an easier to understand interface
– You can place complicated algorithms inside of an Add-On Instruction, and then provide an easier to understand interface by making only essential Parameters visible or required.
– You can reduce documentation development time through automatically generating instruction help.
• Protection of intellectual property
– You can place your proprietary code inside of an Add-On Instruction, then use Source Protection to prevent others from viewing or changing your code.
• Simplify maintenance
– You can simplify code maintenance since Add-On Instruction logic animates for a single instance.
An Add-On-Instruction can be used across multiple projects. You can define
the instructions, or the instructions can be provided to you by someone else,
or they can be copied from another project.
Once defined in a project, they behave similarly to the built-in instructions
already available in the RSLogix 5000 software. They appear on the instruction toolbar and in the instruction browser for easy access, just like built-in RSLogix 5000 software instructions.
 
Mask Instruction RSL5000

Hello. I attached a screenshot of my question. It uses a "Mask.Dn" instruction. Could someone tell me what exactly the mask is/does? I have masked bits in bitwise instructions however, I have not seen one used like this. Thank you.

mask.jpg
 
It's impossible to know what that does without seeing the full instruction that it comes from.

For all we know, MASK could be a timer or counter and that's its Done bit.

One of the drawbacks of add-on instructions is that if the author doesn't describe them well, they're more difficult to figure out than an ordinary logic routine using the built-in instructions of the controller.
 
The .DN bit is a "done" bit for whatever instruction "MASK" is executing. For example, you have a timer at the end of that rung called "SUC_HI_DLY"; when that timer finishes timing, the SUC_HI_DLY.DN bit will turn on.

To find out what your MASK is doing, right click on the MASK.DN bit and select Cross Reference. The list that appears should contain all instances of the MASK.DN bit, and also the root instruction that generates the .DN bit. Go to the root instruction - that will tell you what type of instruction it is, and you should be able to work out from there what it's doing and what it means to have it be "done".
 
A word of caution about the AOI instruction. If you right click on the instruction, you can see the ladder logic that was used to create the function of the instruction. Be VERY VERY careful about changing anything in the programming inside of an AOI intstruction. Any change you make will affect every instance of that AOI, not just the one on that rung. The law of unintended consequences can be swift and harsh. Please don't ask how I know this so well....

Will.
 
It's impossible to know what that does without seeing the full instruction that it comes from.

For all we know, MASK could be a timer or counter and that's its Done bit.

One of the drawbacks of add-on instructions is that if the author doesn't describe them well, they're more difficult to figure out than an ordinary logic routine using the built-in instructions of the controller.

I have used .DN bits a lot, over the years, its just the word "Mask" that is throwing me off here. If I remember correctly from bitwise instructions in RSL500 for example, if I "mask" a bit, it will skip that bit, if data is changed or not. Many years ago in the PLC Boot Camp I believe Ron gave the example of "lining up all the soldiers". Hey, those little stories help. Lol
 
The .DN bit is a "done" bit for whatever instruction "MASK" is executing. For example, you have a timer at the end of that rung called "SUC_HI_DLY"; when that timer finishes timing, the SUC_HI_DLY.DN bit will turn on.

To find out what your MASK is doing, right click on the MASK.DN bit and select Cross Reference. The list that appears should contain all instances of the MASK.DN bit, and also the root instruction that generates the .DN bit. Go to the root instruction - that will tell you what type of instruction it is, and you should be able to work out from there what it's doing and what it means to have it be "done".

Good advice, thank you. Of all the goofy things, I thought this mask was a RSL instruction or code, forgetting the programmer can name it whatever they want. Sorry for the goofy question. :oops:

mask.jpg
 
Quick but important point...

ceilingwalker said:
...I thought this mask was a RSL instruction or code...

That's fine and an easy mistake to make when your still learning the ways of RSLogix 5000. The fundamental lesson for you to learn here, and anyone else unsure, is that the graphical representation underneath the "MASK.DN" tag denotes an XIC instruction (Examine If Closed) and always will. Nothing written above it will change that fact. Once an XIC instruction has been selected and dropped into that rung, or typed into the mnemonics editor, a tag name assigned to it cannot make it change into any other instruction. The assigned tag, wherever it originates from, must be of BOOL data type to satisfy the XIC instruction. So even if a valid assigned tag name was "CONVERT_TO_BCD", this is still a BOOL tag and will either have a value of 0 or 1. This example BOOL could be a precondition to a rung of logic that executes such a conversion.

The ".DN" in a tag name may be a give away that it is most likely the Done bit from a tag of data type TIMER or COUNTER, but there are many instructions whose related tags use a Done bit...

Timer and Counter instructions, Bit Shift instructions, Message instructions, Sort instructions, FIFO instructions, ASCII instructions, Motion instructions, and on...

So without a tag comment, that cross-reference is key to tracking down the source data type to the ".DN" tag member.

Regards,
George
 

Similar Topics

In RSLogix5000 I am attempting to create an add-on instruction called "SWAP" which simply swaps the values of two integer tags. Here is what the...
Replies
5
Views
1,933
Are there any downfalls to using add-on instructions, other than having to import them manually? I would like to create add-ons for such things...
Replies
2
Views
1,731
The help file for RSLogix 5000 v16 mentions several instructions that cannot be used within a custom Add-On:JSR Jump to Subroutine...
Replies
1
Views
6,741
messing around with the Add-Ons, already have some issues with the new Start Page, and came across first issue. I have created an Add-On and...
Replies
18
Views
7,312
Hello everyone. I'm working with RSLogix 5000 and everything looked to be perfect, I am able to watch all my devices en RSLinx. So I have a...
Replies
1
Views
1,924
Back
Top Bottom