Logix 5000 Routine Name

Tim Ganz

Member
Join Date
Dec 2010
Location
Dallas, Texas
Posts
689
I need to keep my routines in a specific order in Logix but it won't let me start the routine name with a number so I was doing R2_Inputs,R3_Comms, Etc. and this worked fine until I got to 10 and it placed it above 2 as it only looked at the first digit.

Does someone have a better method?
 
I need to keep my routines in a specific order in Logix but it won't let me start the routine name with a number so I was doing R2_Inputs,R3_Comms, Etc. and this worked fine until I got to 10 and it placed it above 2 as it only looked at the first digit.

Might I ask why ??
 
Might I ask why ??
He probably wants them ordered logically in the tree, purely so he can navigate by the 'function' in order.

He may not be aware that this has no affect on how they are actually scanned & process, but that is another topic.


IMHO, I think this is a common practice. I have seen & used it many times.
Another thread on this topic would generate some interesting comments/practices.
 
I have done this for simply visual preference, understanding it is aesthetic and doesn't control logic scan order, but it may better follow a list of JSR calls, for example, than the way RSLogix sorts them.
 
Even though it doesn't affect scan order I do it just so that its easier to find stuff. When you have 50+ routines in a program its a lot easier to find what you want if they are ordered in a logical manner. In general I try to use the same blocks of routine numbers for the same type of functions from project to project, so it makes it easier when switching back and forth between projects.
 
I do the same, just so it is easy to find a section of code in a hurry. For machine section control, I generally make the big steps by 10's, and then break down each of those sections into common logic routines.

Example:

_020_Payoff_Sequencing
_021_Payoff_Reference
_022_Payoff_Drive_Ctrl
_023_Payoff_Misc

I know I could do a similar thing by using sub-tasks, and I do for out of the ordinary logic, but for general line control, I keep it organized basically like the above, starting with the first operational unit, and going logically down the line to the final OU.
 
I do this occasionally as well. Particularly when the programs get big. I like to have a consistent structure to help me locate things faster.

I do it with my PanelView screens as well. I always name the screen with the selected screen number so that I don't have to drill down into the screen properties all the time to remember which screen is which. I usually keep track of what screen is being used in the program.

It never hurts to enumerate anything even if it is just for housekeeping.
 
Well I'm gonna chime back in and say that "enumerating" the subroutine files, IMHO, will require someone to have a good memory - i.e. what number did I give that "Recipe_Handling" subroutine, or what number did I give to "Inter_PLC_Comms"

If I want to look at "Input_Mapping", or "Output_Mapping", I know they will be listed in the "I"s and the "O"s, respectively. And I will find the "Recipe_Handling" in the "R"s. The "Inter_PLC_Comms" subroutine I know will be found in the "I"s

It really doesn't make much sense to me to attach a number to a file so that it lists in number order, as it requires me to remember numbers on top of all the other stuff I have to deal with.

Enumerating the files serves no purpose, it doesn't impose an execution order, and I believe it makes it harder to find what you are looking for, it's just another level of complexity that needn't exist.

And how do you "enumerate" a function file, i.e. a subroutine that is called many times, it won't "fit" into any numbering scheme.

One of the big advantages of Logix5000 over SLC or PLC5 etc., is that things are "named" rather than "addressed". We have named routines, surely a well-presented name can give more meaning in terms of its function than a number prefixed to the routine name.
 
Last edited:
Use a number and a routine name.
R01_Input_Map
R02_Output_Map
RO3_Analog_In
R04_Analog_Out

or... as I do...just alphabetize the routines
Analog_In
Analog_Out
Input_Map
Out_Map

Then your routines are either number sequenced or in alphabetical order.
 
Last edited:

Similar Topics

Hello, I am programming a ladder routine that finds a part on a conveyor that has a given part number. I am having no problem finding the part and...
Replies
1
Views
1,906
Good Morning , I'm merging another RS Logix 5000 PLC program ( CompactLogix ) into another . Everything is working great except this one...
Replies
9
Views
3,713
Hello Experts, Will there be any issue if i add a routine Online in Run Mode?? Will it require a download? I don't have a live PLC for simulation...
Replies
3
Views
3,483
Hello, Thanks in advance.. Friends in one our machine computer RS Logix 5000 V 16 is installed.. As when I am opening the PLC program, ladder...
Replies
2
Views
3,754
Hello all, I'm working on a project. It's my first big project working on the RSLogix 5000. I have a long program and different functions. If I...
Replies
6
Views
3,900
Back
Top Bottom