{
	"id": "cff1473f-7ee2-48d5-9db9-40f7461ab810",
	"created_at": "2026-04-06T00:07:05.146873Z",
	"updated_at": "2026-04-10T03:20:55.192299Z",
	"deleted_at": null,
	"sha1_hash": "44e2002b7b25d6e2ea0f50778b89efd18a5b7902",
	"title": "Understanding PLC Programming Methods and the Tag Database System",
	"llm_title": "",
	"authors": "",
	"file_creation_date": "0001-01-01T00:00:00Z",
	"file_modification_date": "0001-01-01T00:00:00Z",
	"file_size": 55654,
	"plain_text": "Understanding PLC Programming Methods and the Tag Database\r\nSystem\r\nBy Dennis Sloatman\r\nPublished: 2016-09-16 · Archived: 2026-04-05 15:32:48 UTC\r\nWe discuss some advanced topics, including tag database vs. fixed memory\r\nIn part one of this series, we looked at the PLC’s internal architecture, briefly discussed Ladder Logic\r\nprogramming, Human-Machine Interfaces, advantages of the PLC’s ability to react consistently with the outside\r\nworld and some possible applications. In part two of this series, we looked at some specifics such as where to buy\r\na PLC, getting started with programming, a small sample program using ladder logic, some ladder logic functions\r\nand provided some links to instructional “how-to” videos. In this article, we move on to discuss some advanced\r\ntopics, including tag database vs. fixed memory.\r\nPLCs vs. LEGACY CONTROL SYSTEMS\r\nIn order to underscore and to drive home the impact of the PLC, let’s consider the legacy method of creating a\r\nsystem controller. Not so long ago the engineer would construct a device employing dozens of relays, diodes,\r\nrelay sockets, possibly resistors and capacitors for timing circuits along with power supplies, wiring, some sort of\r\nwiring termination (i.e., barrier strips) and an enclosure. Should any changes to such a controller need be made or\r\nany enhancement added, wiring harnesses would have to be undone, moved, parts added or removed — all of\r\nwhich gets messy and is quite time consuming.\r\nObvious negatives to such a system controller are maintenance and serviceability, aside from the difficulty in\r\nmaking changes.\r\n And let’s face it: The moment you leave the station, those custom controllers are scary to your successors at best,\r\nand at worst, removed and tossed out as soon as possible.\r\nConsider the control system shown here. It was part of the New York City subway system.\r\nAlso consider the conditions at many broadcast transmitter sites: Dirt and dust, temperature extremes, humidity\r\nand EMI/RFI are common.\r\nIn part 1 of this series, I pointed out that devices such as the Arduino and Raspberry Pi aren’t good choices in\r\nthese sorts of environments. Their lack of capacity to drive or sink the current necessary to work with industrial\r\nloads means that they need to be supplemented with custom enclosures, relays, power supplies for the relays and\r\nconnectors — thus putting them right back in the legacy category I previously mentioned, largely negating their\r\nbenefits.\r\nhttps://www.radioworld.com/industry/understanding-plc-programming-methods-and-the-tag-database-system\r\nPage 1 of 4\n\nPROGRAMMING METHODS\r\nIn previous articles, I have discussed ladder logic, which is very much a sort of electronic schematic\r\nsymbolization of the control system you are designing. This makes programming the PLC accessible to the\r\nbroadcast engineer who has a solid electrical/electronic background.\r\n In the next illustration, you see an example of ladder logic drawn from an AM station antenna controller I\r\ndesigned some years ago. Contacts are at the left on the ladder with Coils on the right (recall that these are internal\r\nmemory locations, except when using true electrical outputs like relay contacts or open-collectors). Logically, the\r\nflow of the system is from left to right (input to output) and then down to the next rung of the ladder.\r\nWhile I believe ladder logic is the optimal programming language for the PLC, there are at least two other\r\nmethods of which the reader should be aware: Functional Block Diagram and Structured Text (which is somewhat\r\nsimilar to Pascal and will not be discussed here).\r\nFBD is an interesting programming method which you should consider as it presents a sort of block diagram look\r\nand feel. FBD may bring forth memories of a digital logic class you may have had in college.\r\nMy advice is to try both of these methods, as you may find that your design is easier to visualize using FBD\r\ninstead of ladder logic.\r\nNot all PLC programming software provided by vendors supports FBD, but all (of which I’m aware) support\r\nladder logic.\r\nIn some cases, the vendor-provided programming software features a simulation mode that permits the designer to\r\ndebug a program without connection to a PLC. This is a powerful feature for testing various designs without\r\npurchasing several controllers (CPUs).\r\nSOME DEEP TECH NOTES REGARDING PLC PROGRAMMING\r\nI once more wish to drive home the point with respect to contacts and coils.\r\nWhen I teach PLC design to engineers who are newcomers to the topic, I often find that there is a common\r\nmisconception (and understandably so) with respect to the ladder logic objects.\r\nThe PLC is programmed with so-called coils (outputs) and contacts (inputs) and even complex function blocks,\r\nsuch as mathematic operators, analog comparators or timers/counters are referred to as coils. Anything that is an\r\noutput or has an output, is referred to as a coil.\r\nAny object on the left of the ladder diagram (see Fig. 1) is a contact — whether or not it’s an actual physical\r\ncontact. Similarly, anything on the right side of the ladder is coil whether or not it’s an actual physical contact.\r\nTo those readers who have had programming courses in college (such as C, C++, Assembler, etc.) or otherwise\r\nhave programming experience in such languages, it helps to consider most of these objects (except for the actual\r\nhttps://www.radioworld.com/industry/understanding-plc-programming-methods-and-the-tag-database-system\r\nPage 2 of 4\n\nhardware coils and contacts) as operating system variables stored in the CPU memory. This, in fact, is precisely\r\nwhat these objects are.\r\nIn some PLC architectures, the programmer is allowed to freely use an object, or in programming terms, to\r\ninstantiate the coil or contact and set the attributes of that object to whatever is required. You can declare whether\r\nthe object is a binary (on/off, digital I/O), 16-bit integer, 32-bit integer, 32-bit floating point, signed or unsigned\r\nand ASCII “on the fly.” This type of programming approach is similar to unstructured programming languages.\r\nPLC TAGS AND THE TAG DATABASE\r\nIn more advanced PLC designs, a more structured programming approach is taken with the use of “tags,” which\r\nare stored within the PLC’s memory in a tag database.\r\nWith a Tag Database, all function blocks, including contacts, coils, program variables (e.g., as a timer value called\r\n“Transmitter_ RF_ Mute_Timer”), as well all other objects, are stored as variables with attributes such as initial\r\nvalue, float, string, integer, Boolean (on/off), ASCII text, discreet inputs and discreet outputs. While this may\r\nseem confusing at first-glance, it’s a superior approach for more complex designs but does require (as in\r\nstructured programming languages) the designer to declare these variables “tags,” as well as the data type in\r\nadvance of their use in the program.\r\nOne salient features of this design is that all of this information (ladder program, variables and comments) is\r\nstored within the PLC, so it’s rather self-documenting — that is to say, anyone making modifications can\r\ndownload the entire PLC program into the programming software, even if they do not have access to the original\r\nprogrammer’s file. (As you might expect, PLCs can be password-protected.)\r\nMuch as in programming languages, you can also assign an initial value to the variable or tag. Data arrays may\r\nalso be defined in the tag database and in fact, this is how I chose to construct a table of pattern change times for\r\nan AM station directional controller with the months as the row data and the pattern change times as the column\r\ndata.\r\nIn summary, Tags are names that you assign to variables of any type stored in the PLC memory. Some examples\r\nof tag names might be: Ant_Sw_Delay, RF_Loss_Delay, Overtemp_Alarm_Delay, etc.\r\nA LOOK AT SOME SAMPLE PLC SPECIFICATIONS\r\nPLCs vary in design. In some, you will see in the device spec sheet a tabulation of how many timers, counters,\r\ncomparators, registers, real time clock functions, internal contacts and other function blocks, such as Proportional,\r\nIntegral, Differential (PID) you have available for use.\r\nGenerally, the number of these provided will be well in excess of your needs, but these are limitations,\r\nnonetheless.\r\nIn more advanced PLC designs, the PLC has a given amount of memory for you to use however your design\r\nrequires. For example, if your design needs 134 timers but only 60 counters, 188 internal contacts, but only 20\r\ncomparators, you have that flexibility to use the available system memory as dictated by your design.\r\nhttps://www.radioworld.com/industry/understanding-plc-programming-methods-and-the-tag-database-system\r\nPage 3 of 4\n\nRecall that I said that all of these ladder objects are essentially variables stored in memory? This is at the very core\r\nof the concept for flexibility of resource allocation.\r\nLet’s look at a representative “fixed-resource” PLC specification sheet (Fig. 3).\r\nJust a quick examination of the Click PLC data sheet will show the quantity of available resources. This $69 PLC\r\nhas quite a number of objects available and for most designs, is more than enough to suffice. Look at the number\r\nof timers: 500! There are 1000 System Control Relays (which are internal CPU-defined memory flags such as real\r\ntime clock functions and internal timers and system flags), 250 counters — each of which can be user-defined as\r\nup/down, up or down with presets. Common programming constructs such as for/next loops, interrupt-handling\r\nand subroutines are also available.\r\nAs I mentioned, more advanced designs using tags allow you to allocate the available resources as your needs\r\nrequire, but you would be hard-pressed to use all the control objects which are available in the representative\r\nspecification sheet above.\r\nIn part 1 of this series, I touched upon deterministic operating systems, and I stated that Windows does not lend\r\nitself well to applications which require real-time control.\r\nPLCs can scan the entire ladder logic program in milliseconds (see specification for Typical Scan in the data\r\nsheet). The PLC is as close to “real-time” as you’ll likely ever get and with repeatable results. This feature of the\r\nPLC can be further enhanced through program segmentation through the use of subroutines and interrupt-handling; that is, initialization of a program can be handled upon startup only (say in a power-up set to defaults\r\nroutine) with timing-critical control handled by interrupt routines (which work in the PLC much as they do in\r\ncomputer CPU’s with stacks, “push” and “pop” action).\r\nNow that we’ve covered the essentials of the PLC, such as programming methods, “underneath the hood” topics\r\nand have discussed some of the specifications, next time, we move to building a broadcast-related application of\r\nan easily available and inexpensive PLC.\r\nSource: https://www.radioworld.com/industry/understanding-plc-programming-methods-and-the-tag-database-system\r\nhttps://www.radioworld.com/industry/understanding-plc-programming-methods-and-the-tag-database-system\r\nPage 4 of 4",
	"extraction_quality": 1,
	"language": "EN",
	"sources": [
		"MITRE"
	],
	"references": [
		"https://www.radioworld.com/industry/understanding-plc-programming-methods-and-the-tag-database-system"
	],
	"report_names": [
		"understanding-plc-programming-methods-and-the-tag-database-system"
	],
	"threat_actors": [],
	"ts_created_at": 1775434025,
	"ts_updated_at": 1775791255,
	"ts_creation_date": 0,
	"ts_modification_date": 0,
	"files": {
		"pdf": "https://archive.orkl.eu/44e2002b7b25d6e2ea0f50778b89efd18a5b7902.pdf",
		"text": "https://archive.orkl.eu/44e2002b7b25d6e2ea0f50778b89efd18a5b7902.txt",
		"img": "https://archive.orkl.eu/44e2002b7b25d6e2ea0f50778b89efd18a5b7902.jpg"
	}
}