{
	"id": "836b4be9-4d6b-46a1-8ebd-d9a0d86ffaec",
	"created_at": "2026-04-06T00:20:07.418997Z",
	"updated_at": "2026-04-10T03:21:09.045603Z",
	"deleted_at": null,
	"sha1_hash": "b69e4e12cbf6a656935ef7757858e5f1e82e3070",
	"title": "PLC Basics: The Ultimate Guide in 2026 - PLCGurus.NET",
	"llm_title": "",
	"authors": "",
	"file_creation_date": "0001-01-01T00:00:00Z",
	"file_modification_date": "0001-01-01T00:00:00Z",
	"file_size": 2825799,
	"plain_text": "PLC Basics: The Ultimate Guide in 2026 - PLCGurus.NET\r\nBy PLCGuru\r\nPublished: 2025-03-12 · Archived: 2026-04-05 17:10:09 UTC\r\nWe are often discussing more advanced topics here at PLCGurus.NET for the more seasoned programmers. This\r\narticle aims to change that! Operator training is crucial for the effective use and maintenance of PLC systems.\r\nTargeting foundational Programmable Logic Controller skills (PLC Basics), this article will serve as a starting\r\npoint for those individuals looking to enter into the fascinating world of PLCs, Automation and Control.\r\nThis article will cover PLC basics in the following topic areas:\r\nWhat is a PLC?\r\nWhy You Should Use a PLC\r\nHow Do PLCs Work?\r\nFundamental Difference Between a PLC and PC\r\nWorking With Number Systems\r\nDifference Between Discrete and Analog I/O?\r\nLogic Gates \u0026 Boolean Expressions\r\nLadder Logic  Programming\r\nFunction Block Programming\r\nSequential Text Programming\r\nConsiderations When Choosing a PLC\r\nThe complexity of control processes plays a crucial role in determining the type of PLC needed, with simpler\r\nprocesses requiring basic controls and more intricate operations necessitating advanced capabilities.\r\nIf you’re new to  programmable logic control and the world of industrial automation, then join us as we explore\r\neach one of these topics at length.\r\nProgramming\r\nPLC Basics – What Is A PLC?\r\nThe term PLC stands for Programmable Logic Controller. The PLC was invented by a young engineer, Dick\r\nMorley, back in 1964. Since this time, the PLC has revolutionized the industrial and manufacturing landscape to\r\nbecome arguably the most integral component of any industrial process in existence today. PLCs have\r\nrevolutionized industrial automation by replacing complex relay-based control systems with easier software-based\r\nlogic.\r\nInitially the PLC was used to replace relay logic, but today its range of functions includes timing, counting,\r\ncalculating, comparing, and the processing of analog signals.\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 1 of 29\n\nA PLC is known as a “hard real-time system” due to the fact that outputs must respond to changing inputs within a\r\nvery stringent time constraint. That said, you can think of a PLC as nothing more than a dedicated  computer\r\ndesigned for fast switching and decision making.\r\nThe main advantage of a PLC over a “hard-wired” type relay control systems, is that PLCs lend themselves to\r\nfunctional changes very easily. What do I mean by this you ask? PLCs simplify system updates and maintenance\r\nby eliminating the need for rewiring when modifying control logic.\r\nA Simple Example\r\nImagine you have a switch that turns on a light. The light has two states, ON or OFF, and will respond almost\r\ninstantaneously to someone either flipping the switch ON, or OFF.\r\nNow imagine you wire this switch up directly to the light and your boss comes to tell you that he would like the\r\nlight to come on precisely 30 seconds after the switch turns on…you have a problem! In order to achieve this it\r\nwill require additional hardware, i.e., a timing relay, and some rewiring. Now enter the PLC!\r\nWith a PLC there will be no need to buy additional hardware every time a change is required. All that will be\r\nneeded is a simple programming change that will delay the light from turning on until 30 seconds after the switch\r\nis thrown.\r\nComputer Hardware\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 2 of 29\n\nAs you can see the light switch becomes an “input” to the PLC, and the light itself is an “output”.\r\nGranted, this is a very simple example, however, even larger more complex systems are nothing more than a\r\ncombination of switch inputs and an assortment of outputs. Then by using software we can build logic to control\r\nthe outputs based in the input conditions. The PLC sends control signals to manage the light, ensuring it turns on\r\n30 seconds after the switch is activated.\r\nPLC Basics – How Do PLCs Work?\r\nProgrammable logic controllers are specialized computers designed to run manufacturing processes. The structure\r\nof a PLC is based on the same principles as those employed in computer architectures. You can think of a PLC as\r\na highly “ruggedized” industrial computer that is designed to withstand harsh environments (i.e., high\r\ntemperatures, dirty or dusty environments) and is highly modular.\r\nThis means that you can add various Input/Output modules and module types in an almost unlimited ordering –\r\nthe only constraint being the number of Input/Output slots you have available in your physical rack (chassis). The\r\nmain components of a PLC are:\r\nRack or Chassis\r\nPower Supply\r\nCentral Processing Unit (CPU)\r\nCommunication Modules\r\nInputs and Outputs\r\nDigital inputs play a crucial role in receiving and processing signals from various sensors and switches, converting\r\nreal-world signals into binary data that the  CPU can interpret and act upon. Input devices transmit signals to\r\nthe PLC from sensors and switches that monitor environmental changes.\r\nPLCs come in all shapes and sizes depending on the process you are intending to control, the memory and\r\nInput/Output (I/O) requirements.\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 3 of 29\n\nPLC Basics – Rack (Chassis)\r\nThe PLC rack (also known as “chassis”) is the backbone of all PLC systems. The chassis provides all the\r\nnecessary mounting for the power supply, backplane and all I/O modules that will reside in it. Illustrated in the\r\nimages below is an example of an Allen-Bradley ControlLogix 1756-A7 chassis.\r\nElectronics \u0026 Electrical\r\nAs you can see in this image that aside from the power supply unit located to the far left of the chassis, the rack is\r\nessentially empty.\r\nPLC Basics – Power Supply and Backplane\r\nThe power supply provides all the necessary voltages to the “backplane” of the PLC chassis. Typical voltages will\r\nbe 24 VDC and 5 VDC to power the CPU, Communication, and Input/Output Modules.\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 4 of 29\n\nPLC Basics – Central Processing Unit (CPU)\r\nThe  central processing unit or CPU is the main “brain” of the PLC. The memory structure of a PLC processor\r\nconsists of several areas, some of these having specific roles.\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 5 of 29\n\nWith “rack-based” memory structure addresses are derived using the rack number, the I/O module slot number\r\nand the screw terminal number where the I/O device is wired into.\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 6 of 29\n\nA typical “rack-based” PLC is the SLC 500 platform of  programmable logic controllers. Their memory space\r\nis divided into two broad categories, namely, Program Files and Data Files.\r\nWith “tag-based” memory structures all data are assigned a variable name called a “tag”. A program can be\r\ndeveloped using only tag names but you must assign input and output tags before the program can be executed.\r\nThe ControlLogix platform of programmable logic controllers employ “tag-based” memory structures.\r\nA PLC program enhances the efficiency and functionality of the system by allowing for complex applications and\r\nsimplifying the programming process, reducing the need for extensive wiring and making system modifications\r\neasier.\r\nAlthough the image above by convention is residing in Slot 0, with the Logix platform of controllers this is not\r\nmandatory as it was in previous platforms of PLC such as the SLC 500 family of controllers.\r\nPLC Basics – Communication Modules\r\nCommunication modules allow the PLC to “talk” over various network protocols. Common modern network\r\nprotocols used are ControlNet, DeviceNet, and Ethernet/IP. These modules will allow the CPU to communicate to\r\nother PLC controllers and/or Remote I/O racks that are distributed in the field.\r\nThe advantage of Remote I/O (I/O that is field distributed) versus Local I/O (these are input and output modules\r\nthat reside in the same rack as the CPU), is that it saves on installation time and money. Rather than having to run\r\nthe wires for all your field input and output devices back to the panel where the local PLC resides, you can “drop”\r\na Remote I/O rack in close proximity to the field I/O devices and wire them up locally.\r\nAfter the remote rack is wired up in the field, you merely need to run a communication cable, i.e., Ethernet cable,\r\nand possibly a couple of low voltage power conductors to power the remote I/O communication adapter its I/O.\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 7 of 29\n\nCommunication modules send control signals to connected output devices like motors and valves, ensuring\r\nefficient operation of the industrial process. They provide installation flexibility and data acquisition capabilities.\r\nPLC Basics – Modes Of Operation\r\nA PLC has basically two modes of operation: the Program Mode and some variation of the Run Mode. A three-position keyswitch may be used to select different processor modes of operation.\r\nProgram Mode is used to enter a new program, edit or update an existing program, upload files and\r\ndownload files. It is important to note that in this mode of operation all outputs are de-energized.\r\nRun Mode is used to execute the user program. Remote PLC programming or mode selection is disabled\r\nwhen the key is in the Run Mode position.\r\nRemote Run Mode (REM) allows the PLC to be remotely changed between program and run mode by a\r\npersonal  computer connected either directly or via a communication protocol to the PLC processor.\r\nTypically most processors are placed into REM mode to allow the engineering or maintenance staff the\r\ngreatest flexibility when performing PLC programming tasks.\r\nPLC Basics – Understanding CPU Scan\r\nVery simply, during each program scan cycle the processor reads all the inputs, takes these value, and energizes or\r\nde-energizes the outputs according to the user program.\r\nThe Program Scan Cylce looks like this:\r\n1. Scan Inputs – is the input ON (1) or OFF (0).\r\n2. Execute Program Logic – executing each instruction and solve the rung logic.\r\n3. Update Outputs – write a logic 1 (ON) or 0 (OFF) to the output.\r\n4. House-Keeping – perform internal checks and system tasks.\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 8 of 29\n\nGranted this is a bit of a simplification and with more modern PLC’s or PAC’s (  Programmable Automation\r\nControllers) as they’re commonly referred, more elaborate scan patterns can be configured. But I say let’s not\r\nmuddy the waters too much here.\r\nIf you are interested in a sneak peak at one of the videos in our Studio 5000 Essentials video series where we\r\ndiscuss more advanced scan patterns, go ahead and view it now!\r\nNot to oversimplify the importance of processor scan and its impacts on overall response time, however, since this\r\nis an introductory welcome to PLC Basics article.\r\nI will reserve those more advanced discussions for other articles. In fact, we’ve done an article on this very topic\r\nat System Overhead Time Slice.\r\nPLC Basics – Difference Between a PLC and PC\r\nAs I mentioned the architecture of a PLC is basically the same as that of a personal computer. However, unlike\r\nPC’s the PLC is designed to operate in the harshest of industrial environments that have a wide range of ambient\r\ntemperatures and humidity. Additionally, properly designed PLC installations can mitigate EMI (electro-magnetic\r\ninterferance – NOISE) present in almost all industrial establishments.\r\nPC’s are highly complex computing machines capable of executing several programs and tasks concurrently\r\nwhereas a PLC is a dedicated real-time system that executes a single (can have multiple programs in ControlLogix\r\nsystem, however, they still executed one at a time in a prioritized ordering) program in an orderly and sequential\r\nfashion from first to last instruction.\r\nUnlike PC’s, the PLC is programmed in relay ladder logic or other “easily” learned languages. It comes with its\r\n programming language built into its memory and has no permanently attached keyboard, monitor, CD drive,\r\nprinter etc.\r\nPLC control systems have been designed with maintainability and ease of installation as a key factor.\r\nTroubleshooting is simplified by the use of fault indicators on the processor and I/O modules. Furthermore, in\r\ntraditional PLC chassis I/O is modularized to allow easy replacement and configuration.\r\nPLC Basics – Knowing Your Bits and Bytes!\r\nIt is important that you understand how PLC memory is arranged. In its most basic form, a piece of data is stored\r\nas either a 0 or a 1 in what’s referred to as a “Bit” of memory.\r\nWhen 4-bits are stored in contiguous memory it is referred to as a “Nibble“. When 8-bits are stored in contiguous\r\nmemory it is referred to as a “Byte“.\r\nTherefore, 1 Byte = 2 Nibbles = 8 Bits. Expanding on this concept, when 2-bytes are stored in contiguous\r\nmemory it is referred to as a “Word“.\r\nTherefore, 1 Word = 2 Bytes = 16 Bits. When you hear that a given PLC or computer for that matter is an 8, 16,\r\n32, 64-bit architecture, it is referring to the number of bits allocated in each contiguous memory location.\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 9 of 29\n\nThis means that each memory location in a 16-bit architecture, such as the Allen-Bradley SLC 500 platform of\r\ncontrollers, has 16-bit words, or can represent a signed integer range of -32,768 to 32,767.\r\nWith advancements in  programmable logic controllers as of late, memory now supports 32-bit architectures.\r\nThis means that each memory location has 32-bits, which is referred to a double word or “DWord“.\r\nTherefore, 1 DWord = 2 Words = 4 Bytes = 32 Bits. A 32-bit architecture can represent a signed integer range\r\nof ?2,147,483,648 to 2,147,483,647.\r\nThe image below captures everything we’ve discussed here in visual form:\r\nNow, if we expand this concept to the modern day PC’s and laptops that boast a 64-bit architecture, also referred\r\nto as a quad-word or “QWord“, what is the largest signed integer that we can represent with that??? I’ll leave it to\r\nyou to research that, but let’s just say it’s a really, really big number!\r\nPLC Basics – Working With Number Systems\r\nIn order to be proficient as a PLC programmer it is imperative that you are comfortable moving in and out of\r\ndifferent numbering systems\r\nBy far the most important number systems that you will need to have command over is the binary number system\r\n(base 2), or the number system that contains only 0’s and 1’s. However, there are other number systems we must\r\nbe comfortable moving in and out of as well, namely, the hexadecimal system (base 16) and the octal system (base\r\n8), and of course the decimal system (base 10), but I’m going to assume you’re okay with that one!\r\nIf you’re unclear why I’ve included the “base x” in each number system, it’s because it gives us an indication of\r\nthe permissible numbers in that system. What do I mean?\r\nFor example, the decimal (base 10) system that we use every day contains valid numbers, 0..9. In general, we can\r\nsay that for a give number system with a base n, there is 0..n-1 numbers we can use in that system – with one\r\nexception the hexadecimal system.\r\nThe Binary System (base 2) has valid numbers, 0..1\r\nThe Octal System (base 8) had valid numbers, 0..7\r\nThe Hexadecimal System (base 16) has valid numbers, 0..9 and A..F (more on this later)\r\nPLC’s like PC’s can only interpret 0’s (low signals) and 1’s (high signals) because it is made up of millions of tiny\r\ntransistors that act as switches being driven by high and low electrical signals. This reminds me of a funny joke I\r\nonce heard,\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 10 of 29\n\nThere are 3 types of people in the world…those who understand binary, and those who don’t!\r\nAlright, maybe not the best joke…but it’s a little funny right? Anyhow, knowing the binary number system and\r\nthese other systems is essential to our understanding of programmable logic control.\r\nPLC Basics – The Binary System\r\nLet’s start by looking at the system we are most comfortable with, the decimal system. If we take the following\r\nnumber: 97510\r\nWhat is this number in reality? We said that the decimal system is base 10, so to compute the number 97510 it is\r\nequal to the following:\r\nNotice the “10” subscript. We usually indicate the base of the number by including the subscript as shown. Let’s\r\ntry some more:\r\nAre you getting the gist of it? The base of the number system represents the multiplier raised to the exponent “x”\r\ndepending on the position of the digit. Let’s try some binary!\r\nRemember we said that the binary number system is base 2. This means that the multiplier is 2 raised to the\r\nexponent “x” depending on the position of the digit. Let’s try some:\r\nLet’s try one that’s a little harder:\r\nSo this shows us a nice convenient way to convert a binary number to a decimal number, but how about the other\r\nway around? What if we need to convert a decimal number to a binary number??? We must divide and conquer!\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 11 of 29\n\nTo convert a decimal number to a binary number we must divide by the base of the number we are converting to.\r\nIn the case of binary this of course is 2. The remainder, either a 0 or 1 becomes the number in the binary sequence.\r\nLet’s try one!\r\nConvert 97610 to binary. Start by dividing the initial number (976) by 2, then continue dividing the resultant\r\nnumber by 2 until the result is 0.\r\nSince the result is 0, we are done!\r\nThe key is to NOT to read the binary string top to bottom, but to read the resultant binary string bottom to top.\r\nTherefore the correct answer: 97610 = 11110100002\r\nPLC Basics – The Octal System\r\nThe octal system is quickly disappearing, however, if you encounter an 8-bit architecture PLC such as the Allen-Bradley PLC 5, then knowing octal will be an asset.\r\nLuckily what we’ve learned so far is going to serve us well here too. As discussed the octal system is a base 8\r\nnumber system. This means that permissible numbers will be between 0..7.\r\nTo convert a binary number to octal requires a 2-step process. First, convert the binary number to it decimal (base\r\n10) equivalent, then using the same “divide and conquer” technique used above, convert the decimal equivalent to\r\noctal. Only this time, instead of dividing by 2 we will be dividing by 8.\r\nLet’s use the same example we did above and convert 11012 to its octal equivalent. Therefore,\r\nNow we divide by 8 to find the octal equivalent,\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 12 of 29\n\nAs we did before, since the result is 0 we need not perform any more operations and we read the resultant octal\r\nstring top to bottom.\r\nTherefore, 11012 = 158\r\nThis same algorithm can be used to compute more complex binary conversions to octal strings.\r\nPLC Basics – The Hexadecimal System\r\nNext to binary, hexadecimal is probably the next most important number system you should be comfortable with.\r\nThe hexadecimal system uses a base 16 number system, with integer values 0..9 and letter A=10, B=11, C=12,\r\nD=13, E=14 and F=15.\r\nHexadecimal numbers are commonly used in computing because they can express every byte as two consecutive\r\nhexadecimal digits versus eight bits. This is useful when identifying memory locations and is much more readable\r\nfor humans.\r\nFor example, the binary byte 111011012 can be expressed in hexadecimal format by separating the binary string\r\ninto its 4-bit nibbles. Then convert the 4-bit nibbles into its decimal (base 10) equivalent. Once it’s in its decimal\r\n(base 10) form, convert it to its hexadecimal (base 16) equivalent. Let’s try it!\r\nConvert 111011012 to its hexadecimal equivalent.\r\nFirst, separate the binary string into its 4-bit nibbles: 1110 1101\r\nNow treat each nibble separately, namely:\r\nHigh-order nibble: 11102 = 1410 = E16\r\nLow-order nibble: 11012 = 1310 = D16\r\nTherefore, 111011012 = ED16\r\nThis can be confirmed using the calculator on your  computer in “Programmer” mode as seen below.\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 13 of 29\n\nBecause hexadecimal form is used so extensively in PLC’s and computing let’s try a more difficult example and\r\nthen verify it using our calculator as we did above.\r\nConvert 11010110101010012 to its hexadecimal equivalent.\r\nFirst, separate the binary string into its 4-bit nibbles: 1101 0110 1010 1001\r\nNow treat each nibble separately, namely:\r\n11012 = 1310 = D16\r\n01102 = 610 = 616\r\n10102 = 1010 = A16\r\n10012 = 910 = 916\r\nTherefore, 11010110101010012 = D6A916\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 14 of 29\n\nPLC Basics – A Quick Word about BCD…\r\nBCD is known as Binary Coded Decimal. It is very similar in structure to the hexadecimal system just discussed\r\nwith some one difference. The binary coding limits us to using only number 0 through 9.\r\nThis type of encoding was widely used for devices such as Thumbwheel switches, 7-Segment Displays and\r\nEncoders.\r\nWe can use the same convention we used to “break-up” a 16-bit binary string for hexadecimal conversion to\r\nconvert an binary number to its BCD equivalent.\r\nExample: Convert the binary string 1001011100010011 to BCD format.\r\nFirst we parse the 16-bit binary string into its 4-bit nibbles as follows,\r\n1001 0111 0001 0011\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 15 of 29\n\nThen computing each 4-bit nibble to its decimal equivalent:\r\n1001 = 9\r\n0111 = 7\r\n0001 = 1\r\n0011 = 3\r\nTherefore, the BCD equivalent is 9713. Binary Coded Decimal was created to provide a more human readable\r\nformat than hexadecimal by limiting the usable values between 0..9 and omitting the letters A..F.\r\nPLC Basics – Floating Point Numbers\r\nFloating point numbers (also known as “Real” or “Decimal” numbers) give us the ability to represent fractional\r\nnumbers with a finite precision. Depending on the architecture of your PLC, i.e., 16-bit or 32-bit, the large the\r\nmemory the greater it will allow you to better approximate the fractional number you wish to represent.\r\nNearly all  computers today follow the the IEEE 754 standard for representing floating-point numbers. This\r\nstandard was largely developed by 1980 and it was formally adopted in 1985, though several manufacturers\r\ncontinued to use their own formats throughout the 1980’s.\r\nIt should be noted that some numbers go on to infinity, for example pi. This number never ends, so it should be\r\nclear that while we can approximate these numbers to a high precision, that it is only an approximation.\r\nPLC Basics – Discrete Inputs and Outputs\r\nDiscrete Inputs (Digital Inputs)\r\nDiscrete Input interface modules connects field input devices of the ON/OFF nature. This classification of I/O is\r\nrelated to bit oriented inputs and outputs – simply put – they can be described in the controllers memory using a 1\r\nor 0.\r\nCommon voltage sources are 120 VAC and more commonly 24 VDC. Discrete PLC modules will specify whether\r\nit will accept AC, DC or both AC and DC, therefore, careful selection is required when sourcing these modules. A\r\ndigital input card will receive an electrical signal (high or low) that will be interpreted as either ON or OFF.\r\nExamples of Discrete Inputs are:\r\nLimit switches\r\nProximity switches\r\nPushbuttons\r\nSelector Switches\r\nDiscrete Outputs (Output Devices)\r\nDiscrete Output interface modules connect field output devices of the ON/OFF nature. A digital output module\r\nwith either turn a device ON or OFF based on the logic that is controlling it and the input states that it depends on.\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 16 of 29\n\nExamples of Discrete Outputs are:\r\nControl Relays\r\nMotor Contactors\r\nPilot Lights\r\nSolenoid Valves\r\nPLC Basics – Analog Inputs and Outputs\r\nAnalog Inputs\r\nAnalog Input interface modules convert a voltage or current (e.g. a signal that can be anywhere from 0 to 20mA)\r\ninto a digitally equivalent number that can be understood by the  CPU through an Analog- Digital Conversion\r\n(ADC) method known as Quantization. Analog input signals to a PLC can vary continuously over a range of\r\nvoltage or current, providing detailed information about connected devices.\r\nTo input an analog voltage (into a PLC or any other  computer) the continuous voltage value must be sampled\r\nand then converted to a numerical value by an ADC.\r\nThe time required to acquire the sample is called the sampling time. ADCs can only acquire a limited number of\r\nsamples per second. The time between samples is called the sampling period, T, and the inverse of the sampling\r\nperiod is the sampling frequency (also called sampling rate).\r\nThe sampling time is often much smaller than the sampling period. The sampling frequency is specified when\r\nbuying hardware, but for a PLC a maximum sampling rate might be 20Hz.\r\nResolution is another term you will often hear in the field when dealing with analog type instruments or sensors.\r\nResolution is defined as the the smallest signal that can be represented by the ADC, or,\r\nResolution =  Full Scale Value / 2n\r\nWhere n is the number of bits allocated to the conversion, which in most cases will be 16-, or 32-bits depending\r\non your controller.\r\nExample: If the analog input module you are using has a Full Scale Value = 10V, and n = 16 bits, then,\r\nResolution  =   10V / 216 = 0.00015258789 V\r\nThis means we can be accurate, or detect a change in voltage to within 0.00015258789 V. Examples of Analog\r\nInputs are:\r\nLinear Variable Displacement Transducers (LVDTs)\r\nThermocouples\r\nResistance Temperature Sensors (RTDs)\r\nFlow Sensors\r\nPotentiometers\r\nAnalog Outputs\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 17 of 29\n\nAnalog Output interface modules will convert a digital number sent by the CPU to it’s real world voltage or\r\ncurrent.  Typical outputs signals can range from -10 VDC to +10 VDC, or 0-20mA and are used to drive mass\r\nflow controllers, pressure regulators and position controls.\r\nAnalog outputs are much simpler than analog inputs. To set an an analog output an integer is converted to a\r\nvoltage. This process is very fast, however, analog outputs are subject to known as quantization errors. Examples\r\nof Analog Outputs are:\r\nProportional Valves\r\nServo Motors\r\nHeaters\r\nAnalog outputs control various output devices like motors, valves, and heaters, playing an essential role in\r\nmanaging industrial processes.\r\nPLC Basics – Logic Gates \u0026 Boolean Expressions\r\nLogic gates in their basic form are electronic circuits that operate on one or more inputs to produce an output\r\nsignal. They are the fundamental building blocks of any digital circuit. Most logic gates will accept two inputs and\r\ndetermine one output, however there are a few exceptions to this.\r\nLet’s focus our attention on the most common logic gates that will translate directly into PLC  programming\r\nand Ladder Logic.\r\nTo evaluate logic gates is sometime useful to use something known as a Truth Table. Truth tables allow us to\r\nevaluate every combination of a logic gate or the combination of many logic gates built into a circuit.\r\nThe NOT function\r\nThe NOT function is perhaps the simplest of all gates. It’s only purpose is to invert or flip whatever the input\r\nsignal is to the output. For example, if the input is 1 the output is 0 and vice versa, if the input is 0 the output will\r\nbecome 1.\r\nThe Ladder Logic equivalent of a NOT gate is:\r\nThe AND Function\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 18 of 29\n\nThe AND function is a very practical uses in PLC programming. The AND function will output the AND’d result\r\nof two or more inputs on its input pins. Meaning, the output will be true only when both inputs are true. Let’s\r\nlook at this symbol little closer.\r\nThe truth table for the AND gate is:\r\nThe Ladder Logic equivalent of the AND gate is:\r\nIt is very clear from the truth table that the output will only be true (1) when both inputs A and B are true (1).\r\nPlease also take note how this is represented in Ladder Logic, it is read, “if A and B are true, then the output is\r\ntrue”.\r\nThe OR Function\r\nThe OR function is another function that has very practical uses in PLC programming. The OR function will yield\r\na true (1) output when either A or B is true, or when both A and B are true. Let’s take a closer look at the OR\r\nfunction.\r\nThe truth table for the OR gate is:\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 19 of 29\n\nThe Ladder Logic equivalent of the OR gate is:\r\nLooking at the truth table for the OR function it is very clear that when either A OR B are the output is also true.\r\nIn addition the output will be true if both A AND B are true as well. So in short, as long as at least one of the\r\ninputs are true, the output will be true.\r\nAlso take not of how we represent a logical OR condition in the PLC using Ladder Logic. An OR condition is\r\ncreated by “branching” the inputs around each other as illustrated.\r\nPLC Basics – Combining AND/OR Functions with a NOT Function\r\nThe NAND Function\r\nThis is where things start to get interesting. If we combine the AND function with the NOT function we get\r\nsomething called a NAND (NOT AND) function. I know, if things weren’t confusing enough right! As it turns the\r\nNAND gate has an important role in the PLC world.\r\nLet’s first look at the truth table to help clarify:\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 20 of 29\n\nObserving the truth table above we see that the output of the NAND function is essentially the inverted output of\r\nthe AND function. So long as A AND B are NOT true, the output is true!\r\nNotice the little circle at the end of what is the AND gate. That little circle is what differentiates the NAND gate\r\nfrom the AND gate letting the engineer know that this is NOT AND or NAND gate.\r\nThe Ladder Logic equivalent of the NAND gate is:\r\nPay particular attention to the Ladder Logic equivalent of the NAND. To build the NAND logic we must place the\r\nA and B outputs in parallel (or branched) as we did for the OR. This time however, we are examining the NOT\r\nstate of each input.\r\nHopefully that’s clear!\r\nThe NOR Function\r\nThis time if we combine the NOT and the OR function we get something called…you guessed it, the NOR\r\nfunction (NOT OR). Following the same reasoning as the NAND above, the output of the NOR function will yield\r\nthe inverted result of the OR function. Let’s take a look!\r\nThe truth table for the NOR function is:\r\nExamining the truth table it is clear that the output for the NOR function is precisely the inverted output of the\r\nOR.\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 21 of 29\n\nSimilar to the NAND gate above, the little circle at the end of the OR is what tells us that it is NOT OR or the\r\nNOR gate.\r\nThe Ladder Logic equivalent of the NOR gate is:\r\nPLC Basics – Let’s Get Exclusive!\r\nTo complete our discussion of logic gates and boolean circuits there are two more functions we need to discuss.\r\nThese functions are the XOR (Exclusive OR) and the XNOR (Exclusive NOT OR).\r\nThe XOR Function\r\nBelieve it’s not as bad as at seems! The Exclusive OR, or XOR is one that we use almost every day in our decision\r\nmaking process. Let me explain.\r\nImagine you are on a plane an the stewardess asks you if you would like a coffee or a tea. Let’s add one further\r\nconstraint to this in that you are only allowed one free beverage, so your choice is either coffee OR tea BUT\r\nNOT both!\r\nThat is how the XOR works, if A is true (1) OR B is true (1) the output is true (1) so long as both A AND B are\r\nNOT true (1). This is why we like truth tables…a picture says a 1000 words!\r\nThe truth table for the XOR function is:\r\nAs we said the output will be true (1), when either A OR B is true (1) but NOT when both A AND B are true (1).\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 22 of 29\n\nNotice the additional curved line added to the OR gate. This indicates that it is the Exclusive OR (XOR).\r\nThe Ladder Logic equivalent of the XOR gate is:\r\nSpend some time to think through the logic and hopefully it will be clear! This bit of logic is read as follows, “If A\r\nAND NOT B is true (1) then turn on the output”, OR, “If NOT A AND B is true (1), then turn on the output”.\r\nNotice that only one of these statements can be true at any given time!\r\nThe XNOR Function\r\nLast in our list of logic gates but certainly not least is the XNOR function (Exclusive NOT OR). If you’ve been\r\nvery studious thus far you can probably predict what the output of this function is going to be???\r\nIf you said the inverted output of the XOR function then you would be absolutely right! The XNOR is precisely\r\nthe inverted output of the XOR function. Let’s take a look!\r\nThe truth table for the XNOR function is:\r\nNotice that it looks very similar to the XOR gate with the addition of the circular NOT symbol on the output.\r\nThe Ladder Logic equivalent of the XNOR gate is:\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 23 of 29\n\nPLC Basics – Programming Languages\r\nPLC  programming involves “downloading” a compiled sequence of binary coded numbers into the PLC\r\nsystem. There are various ways we can perform PLC programming tasks, however, we will focus on 3 of the most\r\ncommon ways indicated by a red box in the image below.\r\nA programming device is essential for writing, entering, and monitoring the PLC’s program. It communicates\r\ndirectly with the  CPU and ensures the system functions correctly.\r\nPLC  Programming Methods\r\nWe will focus on three in particular: Ladder Logic, Function Block, Structured Text or Statement Logic\r\nPLC Basics – Introducing Ladder Logic Programming\r\nThe most common PLC Programming “language” is something referred to as Ladder Logic. Ladder Logic has\r\nevolved from the days of controlling machines or processes using electro-mechanical relay devices or “relay\r\nlogic” as it is referred.\r\nIt is a graphical representation of the “relay contacts” that would have been used in a relay controlled system.\r\nEach rung of ladder typically has one coil at the far right and then logical “input contacts” to the left.\r\n-[    ]- Normally open (Examine if Closed) contact.\r\n-[ ]- Normally closed (Examine if Opened) contact.\r\n-(    )- Output Coil.\r\nHere is a simple Start/Stop circuit with some compare instructions written in Ladder Logic.\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 24 of 29\n\nThe input contacts are then arranged in a logical AND, OR type configuration to turn on an output as was\r\ndiscussed in the previous section. We provide a comprehensive PLC instruction set list below so keep reading!\r\nPLC Basics – Introducing Function Block Programming\r\nAnother common way to program a PLC is using Function Block. A Function Block Diagram (FBD) is a graphical\r\ndepiction of process flow using simple and complex interconnecting blocks. FBD’s are typically organized into\r\nmultiple “sheets” allowing one to organize the instruction sets – typically one sheet per device.\r\nSee below a sample function block routines for 4 different motor controllers.\r\nIt’s important to note that once the routine is executed all sheets in the list are executed as well. Below is a\r\nFunction Block program created using Studio 5000 software, making use of a PIDE (Proportional Integral\r\nDerivative Enhanced) instruction to control a closed loop process. You can see that the instruction effectively get\r\n“wired up” using the various input and output tags.\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 25 of 29\n\nPLC Basics – Introducing Structured Text Programming\r\nStructured text is a textual programming language that uses statements to define what to execute. It follows more\r\ntraditional programming conventions that you would find with procedural type languages, however, typically it is\r\nnot case sensitive.\r\nA series of statements (logic) is composed by formulating assignments and relationships using various operators\r\nas depicted.\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 26 of 29\n\nIn most cases where I’ve seen this type of PLC programming language used is when the programmer needs to\r\nhandle those types of functions or operations that can’t be defined clearly or efficiently using the other two\r\nmethods.\r\nOne word of caution – as a PLC programmer we always have to be cognoscente of who will be maintaining our\r\nprograms after the project is complete. In my experience, this often will be left to maintenance staff, namely,\r\nelectrical maintenance.\r\nThis is why ladder logic programming is by far the most common language used in industry today, because as we\r\nmentioned early it evolves from the relay logic circuits of old that electricians in most facilities are familiar with.\r\nPLC Basics – Common Instruction Sets\r\nThis is largely dependent on the PLC programming platform you are using, however, most PLC’s today will\r\ninclude the following instruction sets or groups and this is not an exhaustive list by any means:\r\nBit Instructions – Binary type ON/OFF instructions XIC, XIO, OTL, OTU, OTE, ONS\r\nTimer/Counter Instructions – TON, TOF, RTO, CTU, CTD, RES\r\nMessage/System Instructions – MSG, GSV, SSV\r\nCompare Instructions – CMP, LIM, MEQ, EQU, LES, GRT, LEQ, GEQ\r\nMath Instructions– CPT, ADD, SUB, MUL, DIV, MOD, SQR, NEG, ABS\r\nMove/Logical Instructions – MOV, MVM, AND, OR, XOR, NOT, SWPF, CLR, BTD\r\nFile Manipulation Instructions – FAL, FSC, COP, FLL, AVE, SRT, STD, SIZE, CPS\r\nFile/Shift Instructions – BSL, BSR, FFL, FFU, LFL, LFU\r\nSequencer Instructions – SQI, SQO, SQL\r\nProgram Control Instructions – JMP, LBL, JSR, JXR, RET, SBR, TND, MCR, FOR, BRK\r\nMotion Instructions – for PLC’s that support servo motion\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 27 of 29\n\nAdvanced Math/Trig – for PLC’s that support advanced mathematical operations\r\nCompact or integrated PLCs, also known as unitary PLCs, are designed for straightforward applications with a\r\nfixed number of I/O points and an integrated  CPU. Unitary PLCs, also known as compact PLCs, are the\r\nsimplest type of PLC.\r\nPLC Basics – Common PLC Acronyms\r\nThe following table shows a list of the some common acronyms or abbreviations you will see and hear when\r\nresearching  programmable logic controllers.\r\nEdit\r\nAcronym Description\r\nASCII American Standard Code for Information Interchange\r\nBCD Binary Coded Decimal\r\nCSA Canadian Standards Association\r\nDCS Distributed Control System\r\nDIO Distributed I/O\r\nEIA Electronic Industries Association\r\nEMI ElectroMagnetic Interferance\r\nHMI Human Machine Interface\r\nIEC International Electrotechnical Commission\r\nIEEE Institute of Electrical and Electronic Engineers\r\nI/O Input(s) and/or Output(s)\r\nISO International Standards Organization\r\nLL Ladder Logic\r\nLSB Least Significant Bit\r\nMMI Man Machine Interface\r\nMODICON Modular Digital Controller\r\nMSB Most Significant Bit\r\nNEC National Electrical Code\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 28 of 29\n\nPID Proportional Integral Derivative (feedback control)\r\nRF Radio Frequency\r\nRIO Remote I/O\r\nRTU Remote Terminal Unit\r\nSCADA Supervisory Control and Data Acquisition\r\nTCP/IP Transmission Control Protocol/Internet Protocol\r\nConclusion\r\nIn conclusion, understanding the fundamentals of  Programmable Logic Controllers (PLCs) is essential for\r\nanyone involved in industrial automation and control systems. PLCs have transformed the manufacturing\r\nlandscape by offering flexible, reliable, and cost-effective solutions for complex industrial processes.\r\nFrom their basic architecture and components to advanced programming techniques like ladder logic and function\r\nblock diagrams, PLCs provide versatile tools for managing inputs and outputs, executing control logic, and\r\nensuring efficient operation of industrial systems.\r\nAs technology advances, the role of PLCs continues to expand, integrating with the Industrial Internet of Things\r\n(IIoT) and other modern automation technologies. By mastering PLC basics, you can unlock the potential of\r\nautomation and drive innovation in your industrial applications.\r\nSource: https://www.plcgurus.net/plc-basics/\r\nhttps://www.plcgurus.net/plc-basics/\r\nPage 29 of 29",
	"extraction_quality": 1,
	"language": "EN",
	"sources": [
		"MITRE"
	],
	"references": [
		"https://www.plcgurus.net/plc-basics/"
	],
	"report_names": [
		"plc-basics"
	],
	"threat_actors": [],
	"ts_created_at": 1775434807,
	"ts_updated_at": 1775791269,
	"ts_creation_date": 0,
	"ts_modification_date": 0,
	"files": {
		"pdf": "https://archive.orkl.eu/b69e4e12cbf6a656935ef7757858e5f1e82e3070.pdf",
		"text": "https://archive.orkl.eu/b69e4e12cbf6a656935ef7757858e5f1e82e3070.txt",
		"img": "https://archive.orkl.eu/b69e4e12cbf6a656935ef7757858e5f1e82e3070.jpg"
	}
}