RSLogix5000: COP best practice. Alias or base?

wildswing

Member
Join Date
May 2005
Location
Sault Ste Marie, Ontario
Posts
281
[FONT=&quot]Hey fellas,[/FONT]
[FONT=&quot]
[/FONT]
[FONT=&quot]My question is about best practice for COP ladder instruction in RSL5k when aliases are involved.[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]I'm dealing with some RSLogix5 ladder logic converted to RSLogix 5000, specifically a COP block copying a handful of reals from one large array to another (old plc5 F files). In the 5 they all had Symbols, which were converted to aliases. The resulting alias tags are not in alphabetic order. The COP block, resulting from the conversion, copies the first alias tag of the source array to the first alias tag of the destination array. I've tested it and it does seem to work.[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Is it a better practice to replace the aliases with the actual base array tags?[/FONT]
[FONT=&quot] [/FONT]
[FONT=&quot]Should I replace this...[/FONT]
[FONT=&quot]COP(FirstSourceTag,FirstDestTag,5)[/FONT]
[FONT=&quot]with this...[/FONT]
[FONT=&quot]COP(F8[1],F80[1],5)[/FONT]


[FONT=&quot]Any advice you may have is much appreciated. Thanks in advance.
[/FONT]
 
The readability of the code is better if the array has a meaningful name, as the others have pointed out. Using just the alias to the first item implies to a casual reader that you are copying just to that item (though the same could be said about listing the first item of the array). Go ahead and try it either way just to satisfy your curiosity but think about changing the array name.
 
I appreciate the feedback guys. I agree. I would also prefer meaningful tagnames. Unfortunately, I am an in-house, chief cook and bottle washer. I do not have the luxury of time required for such things.

Regardless of whether using aliases or base array tags works the same, is there an accepted best practice?

[EDIT] Sorry Bernie, you replied as I was writing. I agree. To me it looks better using the base array tagnames.
 
Last edited:

Similar Topics

hi, I have a machine with 2 QR code readers, reading simultaneously, and i am decoding the ascii data from them into DINT for simple label to...
Replies
3
Views
1,460
I think this may be posted on here twice. My mistake, I'm still learning. Attached are two rungs of logic that were written in RSLogix 500. After...
Replies
4
Views
2,446
Hi! So my problem is a little funky, I had Studio 5000 v 24 and 30 installed, but forgot to install RSLogix (which I cannot go without). Is there...
Replies
2
Views
124
So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
428
Hello everyone, I have an RSLogix5000 project which is running live in the factory but I need to make some changes to the logic. I want to test...
Replies
0
Views
1,125
Back
Top Bottom