PLC rslogix5000

ahmedmoh1018

Member
Join Date
Jan 2021
Location
OHIO
Posts
2
Hi everyone,
How can I know what type of tag do I have to use? Like if i have a coil that is connected only to contacts and can be used by all programs on the PLC??
 
Welcome to the forum!

I don't quite follow your question. If you want to know what data type an instruction supports, the help files for each instruction explain this. Put an instruction on a rung, put the cursor on it and hit F1 on the keyboard, this will bring up the help file.

There are 2 "places" tags can be created. Controller Scope and Program Scope. A controller scope tag can be used anywhere in your project. Program scope tags can only be used within the program they were created in.

Why chose one scope over the other? That depends on how big your program is and how organized you want to be. Programs that tend to have a lot of repetativeness tend to benefit from program scoped tags. Say you have 4 production lines in the same PLC, all have identical functionality. Organizing each line in its own program would allow you to duplicate each line easily since the tag names for each line could be the same if they were declared in each lines program scope.
 
Last edited:
Hi everyone,
How can I know what type of tag do I have to use? Like if i have a coil that is connected only to contacts and can be used by all programs on the PLC??

TYPE or SCOPE
TYPE, in this case, would certainly be BOOL, or a BOOL element of a structure.

SCOPE has been already answered.
 
Just for information, RW tend to use different descriptions than most IEC conventions (I suppose you call it that), there are two "scopes" if you like i.e. Global & local variables, Global can be accessed/used in all programs or functions i.e. they are exposed to all code regardless, Local are only available within the program they have been configured, effectively these are like declaring a variable within a block of code.
Variable types are generally Bool, Integer (various types), real or floats etc.
Tag based variables were introduced for a number of reasons, originally, variables were generally fixed address spaces i.e. bools like "M", "F" & in AB money "B" and integers, Reals etc. like "D", "DW" "N", "F" , however, the introduction of ST was to harmonise code therefore make it transportable between platforms for example the code could be interpreted in RW, Siemens, Mitsubishi, Omron etc. Many platforms wanted to be able to use the IEC with existing hardware instead of having a separate IDE like CLX compared to RSL some like Mitsubishi came up with GXIEC & GXWorks that could program both the older hardware & newer processors.
In the case of Mitsubishi there are two ways of allocating variables to the existing "fixed" address spaces, one is purely tag based where the actual addresses are fixed i.e. a bool tag is hard coded as a fixed address for example My_Tag is tied to M200 (actual address), the other is purely tag based where the address is decided at compile time, Mitsubishi do this by allocating a section of tags not normally used by programmers for example bool addresses in a typical PLC are M0 to M12000, M900 to M1000 are allocated to compile time addresses. M0-899 can be used directly, the others are allocated at compile time by the compiler, there is a minor problem with this that HMI's cannot use the tag name with existing Mitsubishi address space but use the actual addresses so these have to be allocated as global so the actual address is known by the programmer to allocate them in the HMI. I do not know about the later hardware and if the newer processors are purely tag based.
 
Hi Dear,
My question about the tags, what the differences between Base and Alias and the other tags? when we have to use an alias tag or a base tag?
 
Hi Dear,
My question about the tags, what the differences between Base and Alias and the other tags? when we have to use an alias tag or a base tag?

An alias tag references the Base tag, almost like indirection.

Sometimes people make over-use of Alias tags, but where they would most likely be used is when addressing Inputs and Outputs.

Suppose you had an output module, in the same chassis as the controller, in slot 4. Bit 7 of that output module would have the physical address ....

Local:4:O.Data.7

You cannot change that address, it is fixed and the "Local:4:O" tag is automatically created when the module is added into the I/O configuration.

If you coded that output without an alias to it, you would have to use documentation to "see" what that output was driving. Whereas if you create a tag that Aliases to it, for example "Flywheel_Clutch", then you can immediately see what the function of the output is, without adding documentation.

Although an Alias tag is a separate entity in the tag databases, both the controller itself, and the Logix5000 programming software, read and write the state of the Base tag, seamlessly, without you knowing much about it.

One word of caution .... it is possible to create multiple Alias tags, aliased to the same Base tag. I have seen this done when an inexperienced programmer wrote code to address an input, for example "Cycle_Start_PB". However, he addressed his code to "CycleStart_PB", saw that it wasn't a valid tag, and created it as an alias tag to the physical input. We then had two alias tags, "Cycle_Start_PB" and "CycleStart_PB" bothe referencing the same base tag. It all works OK, butit can make fault-finding, and troubleshooting a nightmare !
 
Last edited:

Similar Topics

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
427
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,120
I am an Electric Engineer working as a maintenance engineer and manage some technician on the production hall now but in the past, I mostly focus...
Replies
12
Views
3,545
Hi all, I am setting up a PLC for data aggregation from multiple remote sites (35-50). Before I get too far into this here is the equipment and...
Replies
15
Views
4,788
Hi this is my first time posting in this forum, so apologies if it isn't in accordance to forum rules. Query 1 Does the structural text in...
Replies
18
Views
6,384
Back
Top Bottom