CLX: Buffering IO - Using distinct tags vs Aliasing

kdcui

Lifetime Supporting Member
Join Date
Dec 2007
Location
USA
Posts
386
Traditionally I create buffer routines to read all inputs into a new tag, and conversely, the output buffers to the actual output tags.

However I have seen programmers just create an Alias tag (in Control Logix) instead of building a buffer routine to move data.

It seems to me that an Alias is not a true buffer, since really it is just pointing to the actual input or output.

Is there a difference between the two and are there any risks / disadvantages using Aliases over actually moving the data into / out of new tags?
 
I prefer to buffer all I/O, but even so, I create alias tags in the routines that scan the inputs and update the outputs. Sure, it's extra work, but the cross reference for something then shows it's rack/slot/channel(bit) assignment.

If you use direct alias tags (or I/O) without buffering, you are probably fine as long as you realize and understand that the values can change in the middle of a scan.
 
From RSLogix5000 help

Alias Tag
A tag that references memory defined by another tag. An alias tag may refer to another alias tag or a base tag. An alias tag may also refer to memory within another tag by referencing a member of a structure tag, or a bit within an integer tag or member.
Note the added emphasis. An alias tag does not define a memory location - it references a memory location defined by another tag (that's why you can't set the data type of an alias)


An alias tag named Start_Button that aliases Local:3:I.Data.0 accesses the memory location of Local:3:I.Data.0, which is not buffered.

An alias tag named Stop_Button that aliases bit 1 of DINT tag I003 access the memory location I003.1. If I003 has had Local:3:I.Data copied into it by the program then Stop_Button is buffered.


I buffer if a bit state change mid scan can cause problems. If it doesn't then I don't bother to buffer. On the rare occasions that buffering is needed I buffer only the necessary tags.
 
Last edited:
I like buffer the Base tag into a INT because often if someone tried to go online with an old copy of the program and uploaded sometimes the alias would be lost and just the base tag would be left though out the program. It was a pain in the a$$ to fix so buffering fixed that.
MOV
Rack2:0:I
I020 <-it also works nice for wire numbers matching the tag. ie I020.3

just my 2cents...
 
IIRC you cannot change the reference tag on an alias online, so I have tend to buffer my I/O in a mapping subroutine. In the event that an input or output fails, it becomes easy to reassign the output by editing two lines of code in the I/O mapping subroutine. No tag names have to change and you don't have to search through the entire program to make sure you haven't missed anything.

I primarily only use aliasing as a means to reference a smaller part of a larger piece of data, for instance an alarm bit in the alarm word that gets sent to the HMI or one word in a larger array that gets messaged to another PLC.
 

Similar Topics

Controller: 1756-L84E v.35 Prosoft MVI56E-MNETC for ModbusTCP/IP I'm having an issue with some of my write commands. The write command that...
Replies
0
Views
194
I have several Avery scale units and they are configured as Generic Ethernet modules, and I am actually reading the data fine for the weight...
Replies
2
Views
420
What's the best way to move a tag value from the panelview+7 to the clx plc. We display amps from a power meter on the panelview screen, read in...
Replies
1
Views
398
I'm running into an issue migrating a PLC-5 using the newer Logix Designer Export when opening a saved .ACD from RSLogix-5. It has multiple RIO...
Replies
2
Views
617
We have two sites that are stranded with no line of site, they are handled by phone/modem with a chain that includes: Stranded site (client)...
Replies
5
Views
908
Back
Top Bottom