Sign in to follow this  
Followers 0
HiGhVoLtAgEgUrU

Controller Tags!

5 posts in this topic

Hello I'm trying to learn 5k software. I managed to write a small program, I created tags in (program tags) and then I gave it allias name. So I got that far, Now I want to know what is USER DEFINED and CONTROLLER TAGS do. And how do I use them in a program, Can someone explain it. If you guys can point to some literature would be great. Better yet if someone has program written in that manner could send it to me. I learn better by looking at it. Thanks guys Edited by HiGhVoLtAgEgUrU

Share this post


Link to post
Share on other sites
The complete project can have 'tasks' which are subdivided into 'programs' which can be further divided into 'routines'. A given program (Program1) has its set of 'Program Tags' can be accessed by any and all routines within that program. A different program (Program2) can have its own set of tags. It can even have a tag with exactly the same name as one in Program1 but it is different. The routines in Program1 cannot access the tags which are defined in Program2. This is set up so that you can have a canned program (let's say 'motor control') with its own set of tags. You could then duplicate that program for multiple motors. You would not have to change the tags to have the seperate program. But you may want to have tags which are accessible by ALL routines in ANY program (maybe something like a 'Run_OK' bit). These should reside in the Controller Tag area. Now to User Defined tags. These are great. You may have a number of tags (DITs, Bits, Floats etc) which are always used together. Let's talk about this 'motor control' I mentioned above). Let's say you always have some bits for status and commands, maybe a DINT for speed, another for a fault number, you get the idea. In the User Defind Tag area you can set up the description (define) such a grouping. Once it is defined (like a DINT is 'defined' as 32 contigous bits) you can then create a tag of that type. Let's say you called this grouping 'motor_info'. Now we create a tag of this type for Pump1. The tag can be called 'Pump1' and it has parts. They would be (for example) Pump1.drive_ok. Another tag for Pump2 woul have its own Pump2.drive_ok. All the information stays together and can be manipulated (for example copied) as one unit. For literature go to www.ab.com, go to Literature Library, in the 'Search Library' box on the side set it to 'Publication Number'. Then search first for 1756-RM (which are 'Reference Manuals'). After you exaust those search for 1756-PM (which are 'Programming Manuals'). That should give you plenty of information. Edited by b_carlton

Share this post


Link to post
Share on other sites
Thanks B_Carlton for info. It cleared it up somewhat. I think I need to pratice writing a program. Is it possible I can look at someone code with all thses things in it. Hey tried on there website. I cant seem to anything. Is it possible someone can provide a me with link.

Share this post


Link to post
Share on other sites
UDT's (user defined tags) are effectively the same thing as a "struct" in C. Google the key word "struct" and you'll get plenty of information. On a PLC, they have three purposes. First, you can create a new "data type". For instance, imagine a program where you have to keep track of a bunch of widgets in a machine with multiple work stations or on a conveyor line. The widgets may have information like "serial number" or "date stamp" or "size" or "color". Instead of creating an array to represent "serials", "dates", "sizes", and "colors", you can create a UDT that represents a widget and then create an array of "widgets". It's a subtle difference but helps clean up your program organization. You can use MOV or other commands to copy entire UDT's around as a single object rather than copying all the individual pieces. Even if you only have a single instance of a UDT, it still helps to keep all your variables neatly organized. This helps you create more modular programs. The second purpose concerns memory. All the data items in a UDT are stored in a contiguous chunk of memory. If you create a "boolean", it will occupy 32 bits. However, if you create a UDT with "run_status", "faulted", and "direction" as booleans, any data items that you create with that UDT will occupy just 32 bits instead of the 96 bits that you would get by creating the 3 booleans as separate values. The third purpose concerns communication. If you use consumer/producer communications between PLC's or you access a tag within a UDT with RS-Linx, then the entire UDT is transferred in a single packet (if it will fit). If you create separate individual data objects, then you get one packet for EACH data item. Using UDT's for communications is far more efficient.

Share this post


Link to post
Share on other sites
Thanks for the help Paul and Carlton hey guys I found this on Rockwell site Here is link if anyone wants to check it out. I thought I post it here. It has good information on tags http://literature.rockwellautomation.com/i...pm004_-en-p.pdf

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0