RSLogix 5000 - best practices

jared1089

Member
Join Date
Jan 2012
Location
NJ
Posts
10
Hi,

I wonder if some might be willing to advise best practices for tag naming in Logix5000. I am more accustomed to RSLogix500 and the freeform nature is bogging me down. Really there are several things that throw me:

For discretes I use type Bool.
Because I coming from RSLogix I give my bits names like "bit0001" and a description.
For OSR instructions I use a name like "bitOSR0001" and leave it at that.
If I try to use descriptive names they become too long.
Then RSLogix5000 does not seem to show which tags are used or unused - I typically end up with a lot of unused that I intend to clean-up later.
Is there a easy way to Rename - I currently delete the tag and then do search/replace?
The only way I can see to keep my tags organized is export then edit in a spreadsheet and import.
I am getting bogged-down with tag maintenance.

Also while I am at it - I used to be able to scale my ladder plots in RSLogix500 and get 20 or more rungs on a page. With 5000 I don't see how to do this. I they trying to get us to switch to structured text?

Thanks for any tips.
 
Jared,

If you are coming from RSLogix 500 then to begin with I would use the same sort of tag name in 5000 as you did for the Address Symbol in 500.

If you go into the controller tags or program tags you can define a filter to show. One of these filters is unused tags.

But be careful. I believe tags that are aliased or included in arrays will show as unused even though they may be used.

I am sure someone else will have more to say.

Mark

Unused Tags.jpg
 
Go to File> Print Options > Ladder Listing > Font/Color and change the font size. This will allow more rungs to fit on the page.
 
For one shot bits. Make a Tag named OSR make data type BOOL[32] This will give 32 tags named OSR to use. The usable address will be OSR[0] Thru OSR[31] no need to make new tag every time. You can use [64] to get even more. that way all your one shots are made and can be found in Tag Datagbase by clicking on the [+]sign beside your tag OSR. Another quick hint as your designing logic and need a new tag. Type tag name for the instruction and hit enter then with tag name still highlighted press Ctrl+W this opens up the new tag editor box. Just set you data type and enter description and your done. New tag complete.
 
OK

Those are some good tips.
Can I also ask what is the intended use of the Alias tag?

Thanks a bunch.
 
I use Alias tags to reference IO Cards

this means that when the guys in the field change wiring (or another project) all I have to do is change the physical tag the alias points to

This is particularly powerful when two programs (not routines) are identical or very similar and the alias tags are set up at program scope - you can copy rungs from one program to another and the alias's take care of the physical IO change
 
Couple things:

1 - The BOOL type is very inefficient to use in a Logix platform. Avoid them, use the DINT data type were possible. A Bool uses 32 bits of memory, so does a DINT. With a BOOL you eat up 32 bits, but can only use a single bit of that pool of 32. With a DINT, you can use every bit within that 32 bit pool. Read the ControlLogix manual for a better explanation.

I declare an array of bits for what I need. Tag: BIT, data type DINT[10]. Gives you an array of 10 words of BIT. 320 BITS that you can use in a program. You can call BIT[0].0, BIT[0].1...BIT[9].31

*NOTE: If you are creating UDTs, then use the BOOL, UDTs are smart and compact BOOL tags into a DINT behind the scenes.

2 - Compacting memory into arrays and UDTs is best practice, this better compacts information for communication to HMI/SCADA devices.

3. Learn about UDTS!!!!

4. You can just rename a tag while offline and it will populate across. Online changes you can't do this. Becareful deleting tags while online, you can cause RSLinx to go into SLOW POLL mode if that tag was communication with HMI/SCADA clients. Same applies to other 3rd party communication software.

5. Learn about AOIs!!!!

That is all for now.

EDIT:

Alias tags, very useful to give a descriptive name for a tag, yet keep the memory compact within arrays/udts for efficient processing and communications.

For example:

Tag Array: OUTPUT_CNTRL_BITS[10].

ALIAS TAG: Heat_Valve BASE TAG: OUTPUT_CNTRL_BITS[10].0
ALIAS TAG: Cool_Valve BASE TAG: OUTPUT_CNTRL_BITS[10].1

In this example, you can use a better descriptive tag for programming, yet it is all compact in an array. Then this array can be read efficiently by a SCADA system or other PLC

EDIT 2:

Controller Tags VS Program Tags, read about it. VERY handy when combined with Aliasing. Nothing like copy and pasting an entire program and just changing alias references in the program tags change the functionality from one system to the next. (IE..Tank 1, Tank 2, Tank, 3 have all the same code but different control devices)
 
Last edited:
I agree with Pauly his method is the best use of memory.

Alias tags as stated by MichealG is good info.

Maybe another way to explain it is in RS500 a physical address of I/O would be I:001/01 which tells you Input card in Slot 1, Input 1
In RS5000 you could create a tag called INPUT_1 and assign the alias of Local:1:I.Data.1 If you make it a base tag and Data Type BOOL then it creates a memory location. Like a B3 bit in RS500
 
Last edited:
I use Alias tags to reference IO Cards

this means that when the guys in the field change wiring (or another project) all I have to do is change the physical tag the alias points to

This is particularly powerful when two programs (not routines) are identical or very similar and the alias tags are set up at program scope - you can copy rungs from one program to another and the alias's take care of the physical IO change

My thinking was that aliases allow you to give meaningful names to IO so that they can be referenced intelligently from HMI.

The bit about the cut/paste of routines with local tags is interesting. I normally do all tags local unless for access by HMI - there should be a way to differential local/global by color.

Thanks for the idea.
 
Couple things:

1 - The BOOL type is very inefficient to use in a Logix platform. Avoid them, use the DINT data type were possible. A Bool uses 32 bits of memory, so does a DINT. With a BOOL you eat up 32 bits, but can only use a single bit of that pool of 32. With a DINT, you can use every bit within that 32 bit pool. Read the ControlLogix manual for a better explanation.

I agree with much of what you said but I think it is OK to let go of the issue memory usage.

I think bool is a byte. I think a byte may be the smallest unit the processor can move.

As with using a hand-saw you have to let the tool do the work.

It would be another thing if we were trying to move data at 1200 baud on a noisy phone line.

Though I am often baffled by how slow a PanelView+ on Ethernet is - what's up with that?
 
For the slow panelviews check the max update rate under display settings in FTView, the default is 1 second but you can set to go as fast as .05 seconds.
 
I agree with much of what you said but I think it is OK to let go of the issue memory usage.

I think bool is a byte. I think a byte may be the smallest unit the processor can move.

As with using a hand-saw you have to let the tool do the work.

It would be another thing if we were trying to move data at 1200 baud on a noisy phone line.

Though I am often baffled by how slow a PanelView+ on Ethernet is - what's up with that?

Actually, the Logix is optimized for DINT processing. So in fact, a BOOL datatype only uses bit 0 of a DINT. The other 31 bits are unused. (lets say you use 32 BOOLS = 1024 bits = 32 DINTs, VS a single DINT) While I agree to some extent the argument of "memory usage" is getting moot, I will say that communications and packing information together is not. While on a small "skid" type system you won't notice anything, but as you scale up to larger systems, multiple SCADA terminals, redundant controllers, redundant servers....it becomes very important to optimize you memory usesage to reduce lag and scan rates in you PLC. I figure, if I need it on a large system, might as well make it a habit even if I am just working on a small system.
 
4. You can just rename a tag while offline and it will populate across. Online changes you can't do this.

Incorrect. You can rename a tag online - either on the ladder window (right-click the tag-name, properties, and change the name), or in the "Edit Tags" mode of the database. Rule for the database views - if the field is white, it can be changed. See the pics...

What you can't do to a tag online is change its structure, i.e. its data-type, array size, what it is an alias for etc.

2012-01-06_163328.jpg 2012-01-06_163543.jpg
 

Similar Topics

Hi All, I'm working on an AOI that needs a ONS incorporated into the logic. Every time I run the instruction the ONS gets stuck on even when the...
Replies
6
Views
3,226
There are many good books for learning RsLogix 5000. I know some are better then others. I would like advice on some of the best books to get. I...
Replies
3
Views
2,160
Hi, My boss just ask me to convert all add on instructions into normal rungs. Currently, it is add ons in add ons.......... I am just wondering...
Replies
5
Views
2,546
Best book and online training for it? better if using emulate 5000
Replies
7
Views
3,423
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
140
Back
Top Bottom