PLC Book Part I — Foundations Chapter 1
Chapter 1 Part I · Foundations of PLC Systems Beginner ⏱ 25 min read ✦ 3 Case Studies

01

Programmable Logic Controllers (PLCs): An Overview

Welcome to your first step into industrial automation. In this chapter we’ll meet the PLC — the small but mighty computer that quietly runs almost every factory, water plant, and traffic light around you. We’ll learn what’s inside it, how it thinks, and at the end we’ll look at three real systems and see how a PLC fits in.

What you’ll be able to do after this chapter

Your goals for this chapter:

  • Explain what a PLC is and why factories replaced relay panels with them in the late 1960s.
  • Name the four main parts inside every PLC and describe what each part does.
  • Walk through the four steps of the PLC scan cycle and explain why scan time matters.
  • Tell the difference between a PLC and a normal personal computer.
  • Classify a PLC by size and pick the right size class for a given application.
  • Identify inputs and outputs in a real industrial system (bottle filling, parking, traffic lights).

Key Concepts & Terms

PLCRelay logicCPUI/O modules Power supplyProgramming deviceScan cycle Scan timeReal-time systemFixed I/O Modular I/OOpen architectureClosed architecture Ladder logicHMIPAC
Section 1.1

What is a Programmable Logic Controller?

Let me start with a picture you already know. Imagine walking into a soft-drink bottling factory. Thousands of bottles slide down a conveyor belt. Each bottle stops under a nozzle that fills it with cola, then moves to the next station where a cap is screwed on. Down the line a label is glued, then the bottle is packed into a box. Hundreds of times every minute. All day, every day, without anyone touching a single bottle.

Who is running all of that? Not a person — a person can’t react fast enough or work for 24 hours straight. The answer is a programmable logic controller, or PLC: a small, tough industrial computer designed to control machines and processes in real time.

WHERE YOU FIND PLCs IN THE REAL WORLD A few of the millions of industrial processes that PLCs run every second of every day. Bottling Line Filling · Capping · Labelling Conveyor & Sorting Warehouses · Logistics Traffic Signals Intersections · City Grids Water Treatment Pumps · Valves · Levels

Figure 1.0 — Everyday PLC ApplicationsFrom the soft drink in your hand to the traffic light at the corner — chances are a PLC is somewhere in the loop.

Unlike the office computer on your desk, a PLC is built tough. It can handle electrical noise from nearby motors, vibration from heavy machinery, dust, humidity, and wide temperature swings. And it works in real time — meaning when an input changes, the PLC reacts within milliseconds, not seconds.

A Short History — Why PLCs Were Invented

Back in the 1960s, factories used relay panels to control machinery. A relay is a small electromechanical switch — flick a coil and a contact moves. To control a complex machine, hundreds of relays were wired together. It worked, but it was a nightmare for two reasons.

First, every time a car factory wanted to change to next year’s model, the entire control panel had to be torn out and rewired. Hundreds of relays, thousands of wires. It took weeks and produced lots of mistakes. Second, relays wear out — every day a few would fail and the whole production line would stop.

In 1968, an engineer named Dick Morley and his team at Bedford Associates designed a small electronic box that could replace those banks of relays. Instead of physical wiring, the control logic was stored in the box’s memory as a program. They called it the Modicon 084 — and it changed industrial automation forever.

Why this mattered so much

Now, when General Motors wanted to change the production line for next year’s car model, an engineer just opened the program on a screen, edited the logic, and downloaded it to the PLC. What used to take weeks of rewiring now took an afternoon of typing. That’s why every modern factory in the world uses PLCs — and why the relay panel is mostly a museum piece today.

Why PLCs Replaced Relay Logic — The Big Advantages

Let’s count the wins. Compared to relay panels, PLCs are:

  • More reliable — they’re solid-state. No moving contacts to wear out, no coils to burn, no metal-to-metal sparks.
  • More flexible — change the logic by editing software, not by rewiring.
  • Much smaller — a PLC the size of a textbook can replace dozens of relays that would fill an entire wall.
  • Self-diagnostic — the PLC reports its own faults. “Input module 3 has a problem.” “Battery is low.” It tells you what’s wrong.
  • Networkable — PLCs talk to each other and to supervisory computers over industrial networks.
  • Fast — a modern PLC scans its entire program in under one millisecond. Faster than a human blink, many times over.
  • Easy to troubleshoot — the engineer watches the program execute live on a laptop screen, with energised parts highlighted in green.

A useful rule of thumb: if your control problem needs more than about half a dozen relays, a PLC will be cheaper, smaller, and easier to maintain over the equipment’s lifetime.

Section 1.2

What’s Inside a PLC — The Four Parts

Open up any PLC — Allen-Bradley, Siemens, Mitsubishi, Schneider — and you’ll find four basic parts. The brand name on the outside changes, but the four parts inside are always there. Let’s look at them.

Pushbutton Limit Switch Sensor Field Inputs INPUT MODULE Optical Isolation CPU Central Processing Unit Microprocessor Memory (Program + Data) System Bus / Backplane OUTPUT MODULE Optical Isolation Motor Light Solenoid Field Outputs POWER SUPPLY AC In → DC Out PROGRAMMING DEVICE Laptop / Handheld Terminal DC power USB / Ethernet Field-side wiring (24 V DC, 120 V AC, 4–20 mA, etc.)

Figure 1.1 — Block Architecture of a PLCThe four functional sections (CPU, I/O modules, Power Supply, and Programming Device) and how they connect to field sensors and actuators.

  1. Power Supply — the part that gives the PLC its electricity. It takes regular plant AC voltage (120 V or 240 V) and converts it to clean low-voltage DC (usually 24 V or 5 V) that the PLC’s electronics can handle. Think of it as the PLC’s heart.
  2. Central Processing Unit (CPU) — the brain. Inside the CPU is a microprocessor that reads your program and decides what to do, plus memory that stores the program and the data. The CPU is what makes the PLC “think”.
  3. Input/Output (I/O) Section — the eyes and hands. Input modules are the eyes — they read signals from sensors, switches, and buttons. Output modules are the hands — they drive motors, valves, and lamps. The I/O section is how the PLC connects to the real world.
  4. Programming Device — the laptop you use to write the program. You type the ladder logic, click “download”, and the program flies into the CPU’s memory through a USB or Ethernet cable. After the download is done, the laptop can be unplugged — the PLC keeps running by itself, forever.

Easy way to remember the four parts

Think of a PLC like a tiny living thing: the Power Supply is its heart (gives it energy), the CPU is its brain (does the thinking), the I/O Section is its eyes and hands (sees the world and acts on it), and the Programming Device is its teacher (gives it instructions). Once it’s been taught, it can work alone.

Open vs. Closed Architecture

Most PLCs are proprietary — that means the hardware, software, and communication protocols all belong to one company (Allen-Bradley, Siemens, Mitsubishi, Schneider). This is called closed architecture. The advantage is that everything inside is tightly integrated and well supported by the maker. The disadvantage is that you can’t take an Allen-Bradley I/O card and plug it into a Siemens PLC — they don’t talk to each other.

An open architecture PLC, on the other hand, uses standard parts that work with other vendors’ equipment. These are rare in industry — most PLC ecosystems are closed.

Fixed I/O vs. Modular I/O

PLCs come in two physical layouts. You’ll meet both in the field, so let’s understand the difference.

FIXED vs MODULAR I/O The two physical layouts you’ll meet in the field. FIXED I/O CPU + I/O sealed in one unit PLC · ALL-IN-ONE RUN · FLT · BAT INPUTS 8 in OUTPUTS 6 out PWR · COM ✓ Cheap · compact · simple ✓ Common on nano / micro PLCs ✗ Fixed point count · not expandable MODULAR I/O Plug-in modules in a chassis (rack) Backplane bus PSU Power CPU DI 16 in AI 8 ch DO 16 out COMM Net ✓ Mix & match · expandable · hot-swap ✓ Standard for small / medium / large PLCs ✗ More expensive than a fixed unit

Figure 1.3 — Fixed vs Modular I/OFixed I/O is one sealed package — cheap and compact, but the I/O count is locked. Modular I/O slides separate cards into a rack — flexible, expandable, and individually replaceable.

  • Fixed I/O — the CPU and the I/O are sealed inside one box, with a set number of input and output points. It’s cheap, compact, and simple. The downside is you can’t add more I/O later — if you need just one more output, you have to replace the whole unit. You’ll find fixed I/O in nano and micro PLCs, often on smaller machines.
  • Modular I/O — the CPU, power supply, and each I/O module are separate cards that slide into a chassis (called a rack). Need 16 more inputs? Plug in another input card. Need analog inputs for a temperature sensor? Plug in an analog card. The cards talk to the CPU through a connector at the back of the rack called the backplane. This is the standard for serious industrial work.
Section 1.3

How a PLC Thinks — The Scan Cycle

Now here’s something important — and it confuses a lot of beginners. A PLC does not work like a normal computer program. A normal program runs from top to bottom and then stops. A PLC program runs in a loop that never stops, called the scan cycle.

The scan cycle has four steps that the PLC repeats thousands of times per second, every second, forever — until you turn it off.

PLC SCAN CYCLE 1–10 ms typical 1 READ INPUTS Sample all field input terminals 2 EXECUTE PROGRAM Evaluate ladder logic top to bottom 3 UPDATE OUTPUTS Write output image to terminals 4 DIAGNOSTICS & COMMS Self-checks, network data exchange

Figure 1.2 — The Four-Step PLC Scan CycleRepeats continuously thousands of times per second. Total time per cycle = scan time, typically 1–10 ms.

  1. Read inputs — the CPU takes a “snapshot” of every input terminal. Is the START button pressed? Yes or no. Is the level sensor seeing water? Yes or no. The CPU writes all these answers into a memory table called the input image.
  2. Execute the program — the CPU reads your ladder program from top to bottom, one rung at a time. For each rung, it looks at the input image, decides what the output should be, and writes the result into another memory table called the output image.
  3. Update outputs — the CPU sends the output image to the physical output terminals, energising or de-energising motors, valves, and lamps in the real world.
  4. Diagnostics & communication — the PLC checks itself for problems (memory OK? watchdog OK?) and exchanges data with other devices on the network (HMIs, other PLCs, SCADA).

Why Scan Time Matters — A Quick Example

The total time for one full scan cycle is called the scan time. For a small program, it’s typically 1 to 10 milliseconds. That’s so fast you can hardly imagine it — your eye blinks in 100 ms, so the PLC can complete 10 to 100 scans during one of your blinks.

But here’s the catch. The PLC only “sees” what’s happening in the world during step 1 of each scan. If a fast event happens between two scans, the PLC may miss it entirely.

Quick thought experiment

Imagine a small part flying past a sensor in 5 ms. If your PLC’s scan time is 8 ms, the part may zoom past the sensor and disappear before the PLC ever takes its snapshot — and the PLC will swear nothing happened. That’s why for very fast events (like counting pulses from an encoder), engineers use special high-speed counter modules that work outside the regular scan cycle. We’ll meet them in Chapter 8.

Section 1.4

Modifying the Operation

Here’s the magic trick that made PLCs unstoppable. To change a relay-based control panel, you have to physically pull out wires, add new relays, and re-wire the terminals. A small modification can take hours and is a frequent cause of mistakes and downtime.

To change a PLC-controlled system, you do this instead: open the programming software on your laptop, edit the ladder logic, click “Download”, and the new logic takes effect in the very next scan cycle. The wiring to the field devices — sensors, switches, motors, valves — usually doesn’t change at all.

This single feature — software-defined control logic — is the entire economic justification for the PLC industry. It is why every modern factory, refinery, water-treatment plant, and manufacturing line in the world runs on PLCs rather than relay panels.

Section 1.5

PLC vs. Personal Computer — What’s the Difference?

Students often ask, “If a PLC has a CPU and memory and I/O, isn’t it just a computer? Why can’t I use my laptop instead?” Good question. The architecture is similar, but they’re designed for very different jobs. Here’s the comparison.

FeaturePLCPersonal Computer
Operating environmentIndustrial — heat, dust, vibration, electrical noiseOffice — controlled, climate-conditioned
I/O designBuilt-in industrial I/O (24 V DC, 120 V AC, 4–20 mA, RTD, thermocouple)Generic ports (USB, HDMI, Ethernet)
Programming languagesLadder, Function Block, Structured Text, SFC, Instruction List (IEC 61131-3)C++, Python, Java, JavaScript, etc.
Execution modelCyclic scan, deterministicMulti-tasking, non-deterministic
Operating systemReal-time embedded, often proprietaryGeneral-purpose (Windows, macOS, Linux)
Reliability target24 / 7 / 365 continuous operationDesigned for daily use
RepairabilityModular — swap a faulty I/O card in secondsUsually replace whole machine or motherboard

So a laptop in a factory would die within weeks — the dust, vibration, and electrical noise would destroy it. And it would never be reliable enough to control machinery, because Windows can pause for a few seconds while doing background tasks. In a PLC, “deterministic” means the timing is guaranteed — you always know when the output will respond.

What’s a PAC?

You might also hear the term Programmable Automation Controller (PAC). A PAC is a modern controller that combines PLC ruggedness with the multi-tasking power of a PC. PACs handle motion control, machine vision, advanced math, and database connectivity that traditional PLCs couldn’t do. The line between high-end PLCs and PACs has blurred a lot in the last decade — many controllers today are really both.

Section 1.6

PLC Sizes — From Tiny to Huge

Not every job needs the same size of PLC. A simple irrigation timer doesn’t need the same controller as an oil refinery. So PLCs are sold in four size classes, mostly defined by their I/O count — the total number of inputs plus outputs the device can handle.

ClassI/O RangeTypical Applications
Nano< 15 I/OVending machines, irrigation timers, simple stand-alone equipment, training kits
Micro15 – 128 I/OSmall machines, packaging lines, single-conveyor systems, HVAC controls
Medium128 – 512 I/OProduction cells, multi-axis machines, batch process skids, small water plants
Large> 512 I/OWhole production lines, refineries, automotive assembly plants, power stations, large water-treatment facilities

When choosing a PLC, you also look at scan speed, supported communication protocols (EtherNet/IP, Modbus, PROFINET, etc.), supported programming languages, available memory size, and price. The golden rule is simple: pick the smallest PLC that does the job. A nano running a paint plant will run out of resources, but a large PLC running a vending machine is a waste of money.

THE FOUR PLC SIZE CLASSES Physical size and I/O capacity grow together. Pick the smallest one that fits your job. NANO PWR Nano < 15 I/O Vending machine Irrigation timer Training kit Smallest MICRO PLC PWR · COM Micro 15–128 I/O Packaging line Single conveyor HVAC controls CPU Medium 128–512 I/O Production cells Multi-axis machines Batch process skids Large > 512 I/O Largest Size · I/O Capacity · Cost · Capability →

Figure 1.4 — The Spectrum of PLC SizesFrom a postcard-sized nano controlling an irrigation timer, all the way up to a large multi-rack system running an entire refinery. Match the PLC to the job.

Worked Examples

Three Real PLC Systems — Let’s See What’s Inside

Now let’s put theory into practice. We’ll look at three systems you’ve actually seen with your own eyes — a bottle filling line, a car parking gate, and a road traffic light. For each one, we’ll list the inputs (what the PLC sees), the outputs (what the PLC drives), and walk through what the PLC does step by step. We won’t write the actual ladder program yet — that’s coming in Chapter 5 — but you’ll start thinking like a PLC engineer.

1

Case Study 1 · Production Line

Automatic Bottle Filling Line

Nano / Micro PLC

The problem: A beverage factory has a conveyor belt that brings empty bottles under a filling nozzle. When a bottle arrives, the conveyor must stop, the nozzle must fill the bottle to a set level, then the conveyor must move on so the next empty bottle takes its place. We want to automate this with a PLC.

BOTTLE FILLING SYSTEM — I/O LAYOUT LIQUID TANK (supply) Fill valve (Y1) filling… Position sensor (X1) Level sensor (X2) M Motor (Y2) Start (X3) conveyor direction

Figure 1.5 — Bottle Filling LayoutThree inputs (Start button, Position sensor, Level sensor) and two outputs (Fill valve, Conveyor motor) — a perfect job for a nano or micro PLC.

Inputs & Outputs

Inputs (PLC sees)

  • X1 Position sensor — detects when bottle is under nozzle
  • X2 Level sensor — detects when bottle is full
  • X3 Start button — operator presses to start the line
  • X4 Stop button — operator presses to stop the line

Outputs (PLC drives)

  • Y1 Fill valve — opens to release liquid into bottle
  • Y2 Conveyor motor — moves the belt
  • Y3 Status lamp — green when running, red when stopped

What the PLC does (the control logic)

  1. Operator presses Start (X3). The PLC turns ON the conveyor motor (Y2). Bottles start moving.
  2. When a bottle reaches the filling station, the position sensor (X1) sees it. The PLC stops the conveyor (Y2 OFF) and opens the fill valve (Y1 ON).
  3. Liquid flows into the bottle. As soon as the level sensor (X2) detects the liquid has reached the top, the PLC closes the fill valve (Y1 OFF).
  4. The PLC turns the conveyor back ON (Y2 ON). The full bottle moves away, and the next empty bottle approaches.
  5. The cycle repeats forever — until the operator presses Stop (X4), which turns everything OFF.
Why this matters: This is one of the most common real-world PLC applications. Every soda bottle, water bottle, and ketchup bottle you’ve ever seen was filled by a system like this. We’ll write the actual ladder program for it in Chapter 5 — Basics of PLC Programming.
2

Case Study 2 · Building Automation

Automatic Car Parking System

Nano PLC

The problem: A shopping mall has a parking garage with capacity for 50 cars. We want a PLC to count how many cars enter and leave, automatically open the gate when a car arrives, and switch on a “PARKING FULL” sign when capacity is reached.

CAR PARKING SYSTEM — I/O LAYOUT ENTRY Entry sensor (X1) Gate motor (Y1) EXIT Exit sensor (X2) Gate motor (Y2) CARS: 23 / 50 Display (Y4) FULL ⚠ FULL sign (Y3)

Figure 1.6 — Car Parking LayoutTwo sensors at entry and exit count cars. The PLC uses an internal counter to track occupancy and turns on a “FULL” sign at capacity.

Inputs & Outputs

Inputs (PLC sees)

  • X1 Entry sensor — pulses when a car enters
  • X2 Exit sensor — pulses when a car leaves
  • X3 Reset button — resets the counter to zero

Outputs (PLC drives)

  • Y1 Entry gate motor — opens entry barrier
  • Y2 Exit gate motor — opens exit barrier
  • Y3 “FULL” sign — lights when capacity reached
  • Y4 Numeric display — shows current car count

What the PLC does (the control logic)

  1. The PLC keeps an internal counter in its memory, starting at 0. This counter holds the current number of cars in the parking.
  2. When a car arrives at the entry, the entry sensor (X1) goes ON. The PLC increments the counter (counter = counter + 1) and opens the entry gate (Y1) for a few seconds.
  3. When a car leaves through the exit, the exit sensor (X2) goes ON. The PLC decrements the counter (counter = counter − 1) and opens the exit gate (Y2).
  4. If the counter equals 50, the PLC turns ON the FULL sign (Y3) and refuses to open the entry gate any more — no new cars can come in. As soon as a car leaves and the counter drops below 50, the FULL sign turns OFF and the entry gate works again.
  5. The PLC continuously sends the counter value to the numeric display (Y4), so anyone passing by can see how many cars are in the parking.
What we learned: The PLC isn’t just a logic box — it can also count, store numbers in memory, and compare values. This is why memory size and counter instructions matter, things we’ll cover in Chapter 8 — Programming Counters.
3

Case Study 3 · Public Infrastructure

Traffic Light Controller (Two-Way Intersection)

Micro PLC

The problem: A four-way road intersection needs traffic lights. We have three lamps in each direction (Red, Yellow, Green) on the North-South road, and three on the East-West road. We want a PLC to cycle them in the proper sequence so traffic flows safely — and never both directions green at the same time (that would cause accidents).

TRAFFIC LIGHT INTERSECTION — I/O LAYOUT N-S signal: Y1 (R) Y2 (Y) Y3 (G) E-W signal: Y4 (R) Y5 (Y) Y6 (G) Pedestrian button (X1) PLC cycles the lights using internal timers — no external sensors required for basic operation.

Figure 1.7 — Traffic Light LayoutSix lamps total — three each for North-South and East-West directions — driven by the PLC through internal timers. An optional pedestrian button extends the red phase.

Inputs & Outputs

Inputs (PLC sees)

  • X1 Pedestrian button — extends red phase
  • X2 Manual override switch — fixed flashing yellow
  • (no other inputs needed) — the cycle is purely time-based

Outputs (PLC drives)

  • Y1 N-S Red lamp
  • Y2 N-S Yellow lamp
  • Y3 N-S Green lamp
  • Y4 E-W Red lamp
  • Y5 E-W Yellow lamp
  • Y6 E-W Green lamp

What the PLC does (the timing sequence)

  1. Phase 1 — N-S green, E-W red (30 seconds). PLC turns ON Y3 (N-S Green) and Y4 (E-W Red). Cars on the North-South road can go; East-West cars wait.
  2. Phase 2 — N-S yellow, E-W red (5 seconds). PLC turns OFF Y3, turns ON Y2 (N-S Yellow) as a warning. E-W stays red.
  3. Phase 3 — N-S red, E-W green (30 seconds). PLC turns OFF Y2, turns ON Y1 (N-S Red) and Y6 (E-W Green). Now East-West cars can go.
  4. Phase 4 — N-S red, E-W yellow (5 seconds). PLC turns OFF Y6, turns ON Y5 (E-W Yellow) as a warning. N-S stays red.
  5. Cycle repeats. The PLC starts again at Phase 1 — and continues forever.

If the pedestrian button (X1) is pressed, the PLC adds an extra 10 seconds to the next “all red” period so people can cross safely.

The big idea here: Notice this whole system has only 1–2 inputs but 6 outputs, and the “logic” is mostly about timing — running each phase for the right number of seconds. That’s why timers are such an important PLC instruction. We’ll learn TON, TOF, and RTO timer instructions in Chapter 7 — Programming Timers.

Common Student Mistakes

Things to watch out for in this chapter:

  • “A PLC is just a computer.” The architecture is similar, but the operating environment, I/O design, deterministic execution model, and real-time guarantees are completely different. A regular PC cannot replace a PLC in industrial work.
  • Confusing PLC with PC. In writing, always use PLC (programmable logic controller). Many older textbooks use just “PC” — but in modern industry, “PC” almost always means personal computer.
  • Ignoring scan time. A 10 ms scan time means the PLC sees the world in 10 ms snapshots. Anything happening faster than that may be missed entirely. Always check whether your fastest input is slower than the scan time.
  • Assuming I/O modules are interchangeable across brands. An Allen-Bradley input module will not fit a Siemens rack, even if they look similar. PLC ecosystems are mostly closed.
  • Mixing up fixed and modular I/O. Fixed = one sealed package with a set I/O count. Modular = a chassis with separate plug-in cards that can be expanded.
  • Forgetting that the program runs continuously. Unlike a script that runs once and exits, a PLC program runs forever — every rung is re-evaluated every scan, thousands of times per second.

Quick Recap

The seven things to remember from Chapter 1:

  • A PLC is an industrial-grade computer that replaces hardwired relay logic with software-defined control.
  • Every PLC has four parts: Power Supply, CPU, I/O Section, and Programming Device.
  • The PLC runs a continuous four-step scan cycle: Read Inputs → Execute Program → Update Outputs → Diagnostics & Communication.
  • Scan time is typically 1–10 ms and determines the PLC’s responsiveness to fast events.
  • PLCs differ from PCs in ruggedness, deterministic execution, industrial I/O, and ladder-based programming languages.
  • PLC size classes — nano, micro, medium, large — are mainly defined by I/O count and chosen to match the application.
  • Real systems (bottle filling, parking, traffic lights) all follow the same pattern: identify the inputs, identify the outputs, then write the control logic that links them.

Review & Self-Assessment

Chapter 1 Review Questions

Try answering each question on your own before tapping to reveal the model answer. The last three questions test the case studies — make sure you understand them.

Q1Define a programmable logic controller in your own words.+
A programmable logic controller (PLC) is an industrial-grade digital computer designed to control machinery and processes in real time. It receives signals from field input devices (sensors, switches), executes a user-written control program stored in its memory, and drives field output devices (motors, valves, lights) accordingly. Unlike a personal computer, it is built to operate continuously in harsh industrial environments and to respond deterministically with predictable timing.
Q2List four major advantages of PLCs over hardwired relay control.+
Any four of: (1) Flexibility — logic changes are software changes, not rewiring; (2) Reliability — solid-state with no moving contacts; (3) Compact size — one PLC replaces dozens of relays; (4) Self-diagnostics — the PLC reports its own faults; (5) Communication — networking with other PLCs and SCADA; (6) High speed — sub-millisecond scan times; (7) Easier troubleshooting — engineers can watch the program run live.
Q3Name the four functional sections of a PLC and state the purpose of each.+
(1) Power Supply — converts plant AC to regulated DC for the PLC’s electronics. (2) CPU — executes the user program, manages memory, coordinates communication. (3) I/O Section — input modules read field sensors; output modules drive field actuators. (4) Programming Device — laptop or terminal used to write, download, and monitor the program.
Q4What are the four steps of the PLC scan cycle?+
(1) Read Inputs — sample all input terminals into the input image table. (2) Execute Program — evaluate ladder rungs from top to bottom and write results to the output image. (3) Update Outputs — write the output image to the physical output terminals. (4) Diagnostics & Communication — run internal self-checks and exchange data on the network.
Q5What is “scan time” and why does it matter for fast events?+
Scan time is the total time the PLC takes to complete one full scan cycle — typically 1–10 ms. It matters because the PLC only sees the input world at the start of each scan. If a fast input event (e.g. a part flashing past a sensor in 5 ms) is shorter than the scan time, it may be missed completely. For events faster than the scan time, engineers use high-speed counter modules or immediate I/O instructions.
Q6Differentiate between fixed I/O and modular I/O.+
Fixed I/O houses the CPU and a set number of I/O points in a single sealed package — cheap and compact, but inflexible and typically not field-repairable. Modular I/O uses separate plug-in modules in a chassis (rack) — more flexible, expandable, and individually replaceable. Fixed I/O is common on nano/micro PLCs; modular I/O is the standard for serious industrial applications.
Q7List three ways a PLC differs from a personal computer.+
Any three of: industrial vs office operating environment; built-in industrial I/O vs generic ports; deterministic cyclic scan vs multi-tasking OS; ladder/IEC 61131-3 languages vs general-purpose languages; real-time embedded OS vs general-purpose OS; modular hot-swap repair vs whole-machine replacement.
Q8A small machine has 8 inputs and 6 outputs. Which PLC size class is appropriate?+
Total I/O = 8 + 6 = 14 points. This falls in the nano class (less than 15 I/O). A nano or small micro PLC would be ideal — using a large PLC would be unnecessary capital expenditure.
Q9Why is optical isolation used between the field side and the CPU side of an I/O module?+
Optical isolation electrically separates the high-voltage, electrically noisy field side from the low-voltage CPU electronics. This protects the CPU from voltage spikes, ground loops, and noise transients that could otherwise destroy the processor or cause unpredictable behaviour. The signal passes through an LED-photo-transistor pair, with no direct electrical connection between the two sides.
Q10In the bottle filling case study, what is the PLC’s role when the level sensor (X2) goes ON?+
When the level sensor X2 detects that the liquid has reached the top of the bottle, the PLC closes the fill valve (Y1 OFF) to stop the flow, then turns on the conveyor motor (Y2 ON) so the full bottle moves away and the next empty bottle takes its place under the nozzle.
Q11In the car parking case study, why does the PLC need an internal counter? What happens when the counter reaches 50?+
The PLC needs the counter to track how many cars are currently inside the parking. The entry sensor increments it, the exit sensor decrements it. When the counter reaches 50, the PLC turns ON the FULL sign (Y3) and refuses to open the entry gate — preventing more cars from entering until at least one leaves and the counter drops below 50.
Q12In the traffic light case study, why is it important that the PLC never turns on both N-S Green AND E-W Green at the same time?+
Because the two roads cross at the intersection. If both directions had a green light at the same time, cars from both roads would enter the intersection together — causing accidents. This kind of “never both at once” rule is called an interlock, and it is one of the most important safety patterns in PLC programming. We’ll cover interlocks in detail in Chapter 6.

Stuck on a concept or working on a PLC project?

Get one-on-one guidance from Dr Ahsan Rahman — Head of Electrical Engineering, with two decades of teaching and supervising PLC-based industrial automation projects.

Request Consultation →