{
	"id": "18cef7f0-f88e-41b1-b2e3-032ed1c255b6",
	"created_at": "2026-04-06T03:35:44.421437Z",
	"updated_at": "2026-04-10T03:21:11.358458Z",
	"deleted_at": null,
	"sha1_hash": "faa34ba00244182798c54e3029d5bd14fe8ca88e",
	"title": "PLC Ladder Logic Basics",
	"llm_title": "",
	"authors": "",
	"file_creation_date": "0001-01-01T00:00:00Z",
	"file_modification_date": "0001-01-01T00:00:00Z",
	"file_size": 608943,
	"plain_text": "PLC Ladder Logic Basics\r\nBy EZAutomation.net\r\nArchived: 2026-04-06 03:32:09 UTC\r\nby Vaidyanath \"Doc\" Nanjundaiah\r\nA Programmable Logic Controller (PLC) accepts inputs from a variety of devices such as switches, sensors etc.,\r\nprocesses inputs according to user programmed control logic, and controls a variety of devices (e.g. relay, motors,\r\nvalves etc.) connected to the outputs of the PLC. The Relay Ladder Logic is the user programmed control\r\nalgorithm.\r\nRelay Ladder Logic is one of the\r\ninternational standards and is the main programming method used to program PLC’s. It mimics the relay logic\r\n(combination of switches, relays, coils and contacts). The decision to use ladder logic as the main programming\r\nmethod was very strategic as it did not need much time to retrain engineers to adapt to this. The first generation\r\nPLCs were programmed with a technique that was based on relay logic wiring schematics. This eliminated the\r\nneed to teach electricians, maintenance technicians and engineers how to program. To this day, it remains the most\r\npopular method to program a PLC.\r\nhttps://www.ezautomation.net/industry-articles/plc-ladder-logic-basics.htm\r\nPage 1 of 7\n\nComparison between Relay Logic and Ladder Logic.\r\nBelow is a very simple motor control relay logic and it’s corresponding ladder logic. Relay Logic has a Start\r\nswitch, Stop switch, Control Relay, Relay Coil (CR1) and a Motor (Mtr). Ladder logic shares similar look and feel\r\nof relay logic. But the physical switches and coils of relay logic are replaced with PLC’s memory location which\r\nare represented as Inputs (I) and Outputs (O) in ladder logic.\r\nTypically the PLC CPU scans the ladder from top left to bottom right and reads and executes the condition of\r\nphysical I/O’s. The time taken to make one pass from top to bottom and execute logic is known as scan time.\r\nA PLC system handles many numbers representing different types of information regarding the process. These\r\nprocess/machine parameters may be anything from the status of the input or output devices, timers/counters, or\r\nother data values. Each PLC manufacturer has their own conventions for this in their PLCs. These memory types\r\ncan be used to store a variety of information and can be used inside various Relay Ladder Logic instructions.\r\nDiscrete / Boolean Memory Type\r\nA Discrete memory type is one bit that can be either a 1 or a 0 (ON or OFF). Discrete memory area is used for\r\ninputs, outputs, control relays, and timer/counter bits.\r\nWord / Register Memory Type\r\nA Word memory type is a 16-bit location that is normally used to store and manipulate numeric or ASCII data. A\r\nword memory location is also called a Register.\r\nPLC CPU Operation Sequence:\r\nhttps://www.ezautomation.net/industry-articles/plc-ladder-logic-basics.htm\r\nPage 2 of 7\n\nPower-up Initialization\r\nAt power-up, the CPU initializes the internal electronic hardware. It also checks if all the memories are intact and\r\nthe system bus is operational. It sets up all the communication registers. It checks the status of the backup battery.\r\nIf all registers are go, the CPU begins its cyclic scan activity as described below.\r\nRead Inputs: The CPU reads the status of all inputs, and stores them in an image table. IMAGE TABLE is PLC’s\r\ninternal storage location where it stores all the values of inputs/outputs for ONE scan while it is executing ladder\r\nlogic. CPU uses this image table data when it solves the application logic program. After the CPU has read all the\r\ninputs from input modules, it reads any input point data from the Specialty modules like High Speed Counters.\r\nhttps://www.ezautomation.net/industry-articles/plc-ladder-logic-basics.htm\r\nPage 3 of 7\n\nExecute Logic Program: This segment is also called Ladder Scan. The CPU evaluates and executes each\r\ninstruction in the logic program during the ladder scan cycle. The rungs of a ladder program are made with\r\ninstructions that define the relationship between system inputs and outputs. The CPU starts scanning the first rung\r\nof the ladder program, solving the instructions from left to right. It continues, rung by rung, until it solves the last\r\nrung in the main logic. At this point, a new image table for the outputs is updated.\r\nWrite Outputs: After the CPU has solved the entire logic program, it updates the output image table. The\r\ncontents of this output image table are written to the corresponding output points in I/O Modules. After the CPU\r\nhas updated all discrete outputs, it scans for the specialty modules. The output point information is sent to the\r\nspecialty I/O like High Speed Counters.\r\nImmediate Inputs/Outputs: There is a possibility that an input changes after the CPU has read or scanned the\r\ninputs. If you have an application that cannot wait until the CPU returns for the next input scan, you can use\r\nImmediate Instructions.\r\nThese instructions do not use the status of the input from the image table to solve the application program. The\r\nImmediate instructions immediately read the input status directly from I/O modules and update the Input table\r\nwith appropriate status of input module read. Similarly, Immediate Output instructions do not wait for the CPU to\r\ncomplete the ladder scan. Immediate outputs are directly written to the image table and Outputs are updated\r\naccordingly.\r\nSubroutines: The CPU executes subroutines when called for in the ladder program. These subroutines are useful\r\nin performing the same logic operation time and time again just upon one call so you do not have to repeat the\r\nrung logic over and over again. Subroutines are also useful in executing a logical function, for example check\r\nlimits, upon receiving an external interrupt from a PLC I/O module.\r\nI/O Response Time:\r\nI/O response time is typically defined as the time required for the control system to note a change in an input point\r\nand update a corresponding output point. In majority of the applications, the processor of a PLC responds\r\npractically instantaneously to this task. There are some applications that require extremely fast I/O scan times. The\r\nfollowing four factors affect the I/O response time of a CPU:\r\n1. The point in the scan period when the field input changes its state.\r\n2. Delay time for Input module to change state.\r\n3. CPU scan time.\r\n4. Delay time for Output module to change state.\r\nhttps://www.ezautomation.net/industry-articles/plc-ladder-logic-basics.htm\r\nPage 4 of 7\n\nSee the diagram above. The I/O response time is minimum when the I/O module gets the input change before the\r\nRead Inputs portion of the Ladder execution scan cycle. In this case the input status is read, the logic program is\r\nsolved, and the corresponding output point gets updated. The total I/O response time is calculated as:\r\nI/O Response = Delay in Input module + CPU Scan Time + Delay in Output module\r\nMaximum I/O Response Time:\r\nThe I/O response time is maximum when the I/O module notes an input change after the Read Inputs portion of\r\nthe Ladder execution scan cycle. In this case the input status gets noted only in the following Input scan. The\r\ndiagram shows an example of I/O response timing for this condition. The total I/O response time is calculated as:\r\nI/O Response = Delay in Input module + 2 times the CPU Scan Time + delay in output module\r\nHow to get the best I/O Response time:\r\nhttps://www.ezautomation.net/industry-articles/plc-ladder-logic-basics.htm\r\nPage 5 of 7\n\nUsing Interrupt subroutines and Immediate I/O instructions is the best way to optimize the I/O Response time of\r\nyour PLC system. The immediate instructions update the I/O points during the ladder logic program execution.\r\nThe diagram shows how immediate input and output instructions affect the I/O response timing.\r\nThe total I/O response time is simply calculated as: I/O Response = Delay in Input module + Instruction\r\nExecution Time + Delay in Output module + Instruction Execution Time = Immediate Input Instruction Execution\r\n+ Immediate Output Instruction + Time for Execution of all Instructions in between.\r\nThe total I/O response time for an external interrupt and a subroutine is calculated as:\r\nDelay in Input Module + execution of subroutine + delay in output module.\r\nAs an example, upon an interrupt you can read the status of an input bit, perform a logical operation on it based\r\nupon the value of some other registers, and turn on an output in less than 50μs.\r\nCPU Scan Time Considerations:\r\nThe scan time includes all the tasks that are performed by the operating system in a cyclic manner. As discussed\r\npreviously, each scan cycle is made up of several segments. Each of these segments takes a certain amount of time\r\nto execute. Among all the segments, the amount of time it takes to execute the application program is the only one\r\nthat has maximum influence on total scan time. This also happens to be the one segment you can control as a user.\r\nIf your application needs a smaller scan time, then you should try to choose instructions with as fast execution\r\ntime as possible. This is because different instructions take different amounts of time to execute. Your choice of\r\nI/O modules and system configuration can also affect the scan time.\r\nConclusion: If you are new to Relay Ladder Logic Programming, here is a sequence you should follow to develop\r\nRelay Ladder Logic program.\r\nDefine your machine automation or automated process.\r\nDetermine hardware requirements for the control design.\r\nDefine control algorithm.\r\nAssign input and output parameters of the process to the control algorithm.\r\nDevelop relay ladder logic project.\r\nMatch I/O addresses of the controller to the correct input/output devices.\r\nTransfer the project to the PLC.\r\nhttps://www.ezautomation.net/industry-articles/plc-ladder-logic-basics.htm\r\nPage 6 of 7\n\nValidate the project.\r\nRun the PLC / project.\r\nSource: https://www.ezautomation.net/industry-articles/plc-ladder-logic-basics.htm\r\nhttps://www.ezautomation.net/industry-articles/plc-ladder-logic-basics.htm\r\nPage 7 of 7",
	"extraction_quality": 1,
	"language": "EN",
	"sources": [
		"MITRE"
	],
	"references": [
		"https://www.ezautomation.net/industry-articles/plc-ladder-logic-basics.htm"
	],
	"report_names": [
		"plc-ladder-logic-basics.htm"
	],
	"threat_actors": [],
	"ts_created_at": 1775446544,
	"ts_updated_at": 1775791271,
	"ts_creation_date": 0,
	"ts_modification_date": 0,
	"files": {
		"pdf": "https://archive.orkl.eu/faa34ba00244182798c54e3029d5bd14fe8ca88e.pdf",
		"text": "https://archive.orkl.eu/faa34ba00244182798c54e3029d5bd14fe8ca88e.txt",
		"img": "https://archive.orkl.eu/faa34ba00244182798c54e3029d5bd14fe8ca88e.jpg"
	}
}