RSlogix - AddOn instruction.

sheperd9

Member
Join Date
Jun 2013
Location
Ohio
Posts
13
I finally got my hands on a copy of RSlogix 5000 and have been playing around with it. I'm a little confused about add on instructions, but I've gotten this far. I attached what I have so far, I just want to know if what I have even resembles the correct syntax, or what I can improve on.

Thanks in advanced.

rung.jpg rung2.jpg
 
OK, I'll bite. First what are you trying to do? Ordinarily, you don't need to use the enable bits.
 
Yeah that's what I was thinking, I wasn't sure though. The top three CPT are for scaling three analog signals from three lvdts, which are separated 120 degrees apart. the second CPTs are using those measurements, and the law of cosines to create a triangle. and the last CPT is finding the circumdiameter of that circle.
 
Make sure to give the AOI a name suitable to the operation it performs. An AOI is a great way to standardize a well established logic set. Even if only used once in the current project it can be saved and easily added to a future project. It can even be exported and shared with others.
 
Whats the term for an add on task? i.e. I have a set of ladders, FB and ST containing all the normal stuff I use i.e. wallclock conversion, flashers, common timers etc. that I use on everything new. I have been doing this by creating a template program and starting with that. but I woudl like ot bring this stuff into older programs that were created by others,
Is there a way to have all that made "importable" into existing programs?
 
You can think of the add on instruction as a function block. It's this black box you can drop into other code and pass things in, and have a result come out. I think this is a good tool for what you are doing, especially if you have multiple instances of these things to calculate.

Click your AOI and then click open definition

4OFYztl.png


Now click the visibility check box to view this thing from the outside of the black box. Click Req if you want to require the user to tie something to that tag before the black box will work.

9NzvyUV.png


Assuming you wrote code in the logic section of your AOI, you now have a block you can tie main program variables to and it will spit out results.

zuatzKC.png


Disclaimer: I have like zero logix experience, and what I know i pretty much learned clicking around and figuring things out. I figured out how to create an AOI but it may not use the best practices. Take my advice with a grain of salt.
 
On the newer versions of 5000, you can export parts of your program to a .L5X file. Sort of like the old library files.
 
When you export an AOI it sends it to an XML description. It contains all the information necessary, including any defined UDTs necessary to build the AOI. It can be imported into any other program (ver 16 and above).
 
That's the main feature of an AOI. You can't modify it during import. You have to edit it offline
 
Thanks everyone, Yes I will be using this multiple times, I didn't want to clutter up the screen and re-apply this every-time. This was literally the first thing I've ever done since opening RS5000, so the names are pretty temporary and just used for testing.

Another question I have is about the CPT functions, was putting them in parellel helpful, excessive, or just no difference either way?
 
Another question I have is about the CPT functions, was putting them in parellel helpful, excessive, or just no difference either way?

The rung is configured to make it easy to read, so yes, helpful (to you), and not excessive.

However, putting them in a string on the rung with no branches will use less memory, and execute faster. Whether that is important to you is your call.....

What I did notice is that the tags ra, rb, rc, BC AB,AC, are all of an Integer type.... considering the maths you are performing, shouldn't these be REAL tags ?
 
Yeah I'm still deciding what to do about that. I think I will change them all to REAL, but I think I'll keep d as INT.
 

Similar Topics

Hi, I'm new to this PLC game. Using RsLogix 5000 I'm trying to write a addon instruction that will write the result string to a destination SINT...
Replies
5
Views
7,247
Hi, I have used 1 Addon block in the Rslogix V16. the block contains two Local timers whose .PRE values were initialised in the Addon logic...
Replies
2
Views
3,150
Hi Everyone, I am not proficient in RSLogix 500 so I have a question regarding the evaluation of N7:0 data as an input. So as I understand in...
Replies
1
Views
84
Hi folks, in the alarm manager of Rslogix 5000, the tag-based alarm has been created. But when I tried to change the condition, it was found the...
Replies
2
Views
154
I have a little bit of experience with Allen-Bradley. I have a Micrologix 1500 (RSLogix 500) and a PanelView Plus 7 (FactoryTalk View Studio ME)...
Replies
3
Views
164
Back
Top Bottom