Tag based programming - worth it or not

Eric once you stop thinking of memory locations in the PLC tag based comea easy. You just call a tag Reset. Do you care that it is in V2316, M2001, C35, B3:0/15, etc? A few minutes learning a couple of tricks and you will be writing you own CLX programs.
 
PeterW I have seen several large conveyor projects auto generated. They where slc 500. It can be done it typically doesn't look as clean though

Examples being Heathrow Airport, where the new terminal had something like 90+ S7-400 PLC's. Almost impossible to have each one independently programmed and then update each with changes as the project progressed. These were auto generated and every few weeks re-generated with updates and given to teams to download.

When I first came to Canada, I worked for another Airport conveying company and these used ControlLogix, every job they re-use the same software, so again auto-generated.

Of course, creating the generator takes time, so its no good for a single PLC one off type job.
 
Eric once you stop thinking of memory locations in the PLC tag based comea easy. You just call a tag Reset. Do you care that it is in V2316, M2001, C35, B3:0/15, etc? A few minutes learning a couple of tricks and you will be writing you own CLX programs.
Thanks for the vote of confidence, Jeff! Years ago, I could concentrate on programming, but now I am stuck doing a lot of the mechanical end as well, and there just aren't enough hours in the day... ;)

🍻

-Eric
 
I understand working 12~16 hrs a day doesn't leave much time for learning.

Side note
How can you be working didn't you knoq the world is an economical stupor. The world is not spending any money and wee are all going broke. Haven't you been reading or watching the news?
If we are in the worst economy that we have seen in 30+ years I an scared to see what happens when we are in a good or great economy. I have a minimum 3 month back log and probably 5 months or better if thw true be known.
 
How can you be working didn't you knoq the world is an economical stupor. The world is not spending any money and wee are all going broke. Haven't you been reading or watching the news?
If we are in the worst economy that we have seen in 30+ years I an scared to see what happens when we are in a good or great economy. I have a minimum 3 month back log and probably 5 months or better if thw true be known.
Yeah, I know. It's terrible out there. /sarcasm

Still a bit wary to hire more employees though. We got hit pretty hard back in '02 and don't want to repeat that.

🍻

-Eric
 
Does any of the PLC programming software have intellisense? That is where you type the first few characters and the computer displays the rest until another character must be entered?

For instance, in our software you can type _A and the computer will add the [ you can then enter the axis number and the ] and the computer will add the . and then provide a list of fields. As enter in characters it reduces the number of displayed fields until you can just hit enter.

Microsoft uses this feature a lot. So do we.
 
Omron CX-Programmer has always had the option of auto generation of memory. It is just that I like to know where things and an be in control so that I can type in numbers much more quickly.

Yes Peter - the Omron software does have that feature - not sure about the others. I do not find this helpful in the over all scheme of things though.

Eric, I guess I was being resistive due to the way I wanted to do things until being forced into the project with tag based and found it to be an absolute pain. As Geoff mentioned early in the piece, tag names can be I/O numbers but that generally means using an underscore before the number - not really an option.

Funnily enough I generally do not even use W (memory bits) either but just CIO in the huge Omron memory map. I do use D of course (registers) and H for memory retentive as well.

I sometimes wish I was in the mainstream and could use FBs effectively for repeated code, UDTs for setting up some of the fancy stuff and saving time but I am not there. Every job is quite different and there is, generally, no re-usable code.

I am finding the submissions to the thread fascinating and I am sure many of the comments will be extremely useful to some people. Keep it going guys - first thread I have been really interested in for some time and some good stuff coming out of it.
 
Much love for tag based programming. Done properly, it is just about self-documenting, and very natural to write and read. I also much appreciate getting rid of all constraints on how many 'things' can fit in a 'file/table/block' etc.

For me, tag based programming is much faster then memory location based programming, by far.
 
I am late to this thread, but I certainly have an opinion.
Do you by "Tag-based" mean the same as "Symbolically" ? If so, then my vote goes to Symbolically/Tag-based. Programming symbolically means you can write reusable code.

edit: Maybe BobB by Tag-based means the difference between classical memory assignment in fixed blocks (AB PLC5 N-files, F-files, B-files, etc.. Siemens Merker, Timer, Counter files) as opposed to newer PLCs where you create memory files that contains a structure of the needed data (BOOLs, INTs, REALS, TIMERs etc. within the same file). If that is what BobB meant, then that also is an argument that Tag-Based programming is much more structured and easy. However, programming with such self-defined structures only makes sensw when you at the same time use symbolic addressing.

IMO writing symbolically and reusable code, reduces the coding time by a factor 2-10. The bigger the project the greater the gain in productivity.
But also for maintenance it is much easier. Make a change and it permeates through the project. Programming with absolute addressing would mean you have to search for and manually modify all the affected places.

Does any of the PLC programming software have intellisense? That is where you type the first few characters and the computer displays the rest until another character must be entered?
Siemens STEP7 has this feature. I would be surprised if other uptodate PLCs do not have this.

BobB said:
Every job is quite different and there is, generally, no re-usable code.
Over the time you would create a framework or library of blocks that you can use even for new projects.
 
Last edited:
I sometimes wish I was in the mainstream and could use FBs effectively for repeated code, UDTs for setting up some of the fancy stuff and saving time but I am not there. Every job is quite different and there is, generally, no re-usable code.
Bob a function block does not have to be a huge function that does everything. In fact this is the most common failing I have seen with the use of function blocks. I find it far more efficient to use a number of tried and true block to achieve an objective. These can then be bundled into a larger function block within a project (if multiple instances are required).
Some examples from my library
- I have a function block for each analog input, here I set a couple of parameters and the input is then scaled to engineering units and alarmed when out of range, or alarmed when High or Low parameters are exceeded. Also all bundled up ready for SCADA.
- I have a generic motor control function block that handles all the usual stuff for a motor starter(alarms, SCADA interface, mode control, stopping and starting), then I connect that block (1 UDT output) to the specific type of motor starter (DOL, Altivar VSD, TeSysU, TeSysT, etc) function block (my library) that is used to interface to the io or comms network to control the actual device
- Valve function block - handles all the usual stuff for a valve (alarms, SCADA interface, mode control, opening and closing)
- PLC cpu and io system status - bundles all that info ready for scada and use in the program
- PLC real time clock - gets and sets the plc time

Write Once, Debug Once, use multiple times
 
Last edited:
A (rather poor) analogy of how I see it... [non Tag-based]

1.) Someone gives me 100 bins. Each group of 10 bins is painted a different color. Black, Brown, Red, Orange, Yellow, Green, Blue, Violet, Gray, and White. Each bin in the group has a number from 1 to 10. I will have NO trouble organizing my parts into these bins, and I will easily remember what parts are in what bins... :)

2.) Someone gives me an unlimited number of bins, and I can paint each of them any color of the rainbow. Now I can't even get started... :cry:
That is a perfect example of where tag-based would be better.
In stead of associating a color with the part, you just write the exact type part on the bin.
So you have "M12 nut, steel", "M12 nut, stainless steel", "M12 bolt 12 mm, steel", "M12 bolt 20 mm, steel", "M12 bolt 12 mm, stainless steel", "M12 bolt 20 mm, stainless steel".
"Washer ø20 mm, steel", "Washer ø26 mm, steel", etc...

If you have a huge number of parts, you would soon run out of colors and numbers that you could easily memorize.

I think if you call sick some day, and your replacement have to find the parts, that person will have a lot easier time if the bins are labelled like my example, rather than with unrelated colors and numbers.
 
Funnily enough I generally do not even use W (memory bits) either but just CIO in the huge Omron memory map

Got in trouble for that. Rob Lloyd always says to use W's! Not that you have to as you clearly know. 👨🏻‍🏫

For the record Bob, I am much younger than you (no disrespect intended 🍻) and I always program Omron in tags. I agree with you that the best of both worlds is awesome, especially when I forget the tag but remember the I/O address!
 
Last edited:
Bob,

I think the problem is more with the customer spec on the tag names, rather than working with tag names themselves. I do like short meaningful tag names, rather than having to type a long tags, as it is easier to type. I also avoid the underscores, as I find they take longer to type.

One of the things I did find, when starting to use a tag based platform, is that I had to come up with a system, to consistently name the tags. I use a camelcase method to name my tags, usually with the first letter or two, to designate the type of tag that it is. ie... aiTank1.Level is the raw input... euTank1.HiHi would be the scaled level HiHi alarm level.

Also, just a note on your customer spec... I am referencing RS5000, but you can program it how you want, and then change the tags later, from the edit tags window.... They will update throughout your program.
 
Another Tag / Function Block thought. In UnityPro when I insert a function block into a program and I name that function block, that instance is then available directly (function block outputs and public variables) as tags. eg I insert a Motor Control function block and name that instance Motor1, then without doing anything else (except connecting the inputs of course) I have every output and public variable from that function block available within the program as tags Motor1.Available, Motor1.Running, Motor1.Current, etc. This saves a huge amount of time. In an addressed based system this would be impossible.
I guess in this case tags and function blocks really allow for an object orientated form of plc programming
 

Similar Topics

Just want to know others PLC brand which offer tag based programming besides RSLogix5000. Thanks.
Replies
61
Views
24,743
I am currently working on converting an Object-based ArchestrA System Platform HMI to a Tag-based InTouch HMI. Currently, the I/O is linked...
Replies
0
Views
42
I seem to be making this harder than it should be, and Its not making any sense. I simply need to move a real variable to two integer variables...
Replies
8
Views
1,024
Hello, I am upgrading some custom AOI's for a customer that was using plantpax 3.5 they are moving to Pax v5. In their old AOI's they were...
Replies
0
Views
561
Good afternoon everyone. Just starting to use Logix based tag alarms, and I am likely a little confused. What I would like to do: Use Logix 33...
Replies
5
Views
1,894
Back
Top Bottom