Bird
Raised Fist0
PLC Programmingscripting~15 mins

PLC hardware architecture (CPU, I/O, power supply) in PLC Programming - Deep Dive

Choose your learning style10 modes available
Overview - PLC hardware architecture (CPU, I/O, power supply)
What is it?
PLC hardware architecture refers to the physical parts that make a Programmable Logic Controller work. It mainly includes the CPU, which acts like the brain; the input/output (I/O) modules, which connect the PLC to machines and sensors; and the power supply, which provides the electricity needed. These parts work together to control machines automatically.
Why it matters
Without understanding PLC hardware, you can't properly set up or troubleshoot automation systems that run factories, buildings, or machines. If the CPU, I/O, or power supply fail or are wrongly connected, the whole system stops working, causing delays or safety risks. Knowing the hardware helps keep machines running smoothly and safely.
Where it fits
Before learning PLC hardware, you should know basic electrical concepts and what automation is. After this, you can learn PLC programming languages and how to write control logic that runs on the CPU. Later, you might study network communication between PLCs and other devices.
Mental Model
Core Idea
A PLC hardware system is like a small computer where the CPU processes signals from inputs and controls outputs, all powered by a dedicated power supply.
Think of it like...
Think of a PLC like a kitchen: the CPU is the chef who decides what to cook, the I/O modules are the hands that take ingredients (inputs) and serve dishes (outputs), and the power supply is the electricity that keeps the kitchen running.
┌─────────────┐      ┌───────────────┐      ┌───────────────┐
│  Power      │─────▶│     CPU       │─────▶│    Output     │
│  Supply     │      │ (Brain/Logic) │      │   Modules     │
└─────────────┘      └───────────────┘      └───────────────┘
                         ▲                      ▲
                         │                      │
                   ┌───────────────┐      ┌───────────────┐
                   │    Input      │      │   Sensors &   │
                   │   Modules     │      │   Machines    │
                   └───────────────┘      └───────────────┘
Build-Up - 7 Steps
1
FoundationUnderstanding the PLC CPU Role
🤔
Concept: The CPU is the central part of the PLC that processes instructions and controls the system.
The CPU reads signals from input devices, runs the control program, and sends commands to output devices. It contains a processor, memory, and communication ports. Think of it as the brain that makes decisions based on the program.
Result
The CPU interprets input signals and controls outputs according to the program logic.
Understanding the CPU as the brain helps you see how the PLC makes decisions and controls machines.
2
FoundationBasics of PLC Input and Output Modules
🤔
Concept: I/O modules connect the PLC to the outside world by receiving inputs and sending outputs.
Input modules receive signals from sensors like switches or temperature sensors. Output modules send signals to devices like motors or lights. These modules convert real-world signals into data the CPU can use and vice versa.
Result
The PLC can sense and control physical devices through I/O modules.
Knowing I/O modules as the PLC’s senses and hands clarifies how it interacts with machines.
3
IntermediatePower Supply Function and Importance
🤔
Concept: The power supply provides stable electrical power to the PLC components.
PLCs need a power supply that converts AC voltage from the wall into the DC voltage the CPU and I/O modules require. It ensures the PLC runs reliably and protects it from power surges or drops.
Result
The PLC hardware receives clean, stable power to operate correctly.
Recognizing the power supply’s role prevents overlooking a common cause of PLC failures.
4
IntermediateModular vs. Fixed PLC Hardware Designs
🤔Before reading on: do you think modular PLCs are easier or harder to customize than fixed ones? Commit to your answer.
Concept: PLCs can be modular, allowing separate CPU, I/O, and power supply units, or fixed with all parts built-in.
Modular PLCs let you add or replace I/O modules as needed, making them flexible for different tasks. Fixed PLCs have all parts integrated, which is simpler but less adaptable.
Result
Modular PLCs offer customization; fixed PLCs offer simplicity.
Understanding modularity helps choose the right PLC for your automation needs.
5
IntermediateSignal Types in Input and Output Modules
🤔Before reading on: do you think digital and analog signals are handled the same way by I/O modules? Commit to your answer.
Concept: I/O modules handle different signal types: digital (on/off) and analog (range of values).
Digital inputs detect simple states like a switch being on or off. Analog inputs measure values like temperature or pressure. Output modules similarly control devices with on/off or variable signals.
Result
The PLC can process both simple and complex signals from machines.
Knowing signal types clarifies how PLCs control diverse industrial processes.
6
AdvancedCPU Processing Cycle and Timing
🤔Before reading on: do you think the CPU processes all inputs and outputs simultaneously or in a sequence? Commit to your answer.
Concept: The CPU runs a continuous cycle reading inputs, executing the program, and updating outputs.
This cycle, called the scan cycle, happens repeatedly and quickly. The CPU first reads all inputs, then runs the logic program, and finally updates outputs. Timing is critical to ensure real-time control.
Result
The PLC responds to changes in inputs and controls outputs in a timely manner.
Understanding the scan cycle timing is key to writing effective control programs.
7
ExpertPower Supply Redundancy and Fault Tolerance
🤔Before reading on: do you think a single power supply is enough for critical PLC systems? Commit to your answer.
Concept: Critical systems use redundant power supplies to avoid downtime.
In important automation, two power supplies run in parallel so if one fails, the other keeps the PLC running without interruption. This design increases reliability and safety.
Result
The PLC system continues operating even if one power supply fails.
Knowing about redundancy prepares you for designing or maintaining high-availability systems.
Under the Hood
Inside the PLC, the CPU uses a microprocessor to execute instructions stored in memory. It continuously scans input modules to read sensor states, processes the control logic program, and updates output modules to control actuators. The power supply converts external AC power to stable DC voltages needed by the CPU and I/O modules. Communication buses connect all parts, allowing data flow between CPU and I/O modules.
Why designed this way?
PLCs were designed to be rugged and modular to withstand industrial environments and allow easy customization. Separating CPU, I/O, and power supply lets technicians replace or upgrade parts without changing the whole system. The scan cycle model simplifies programming and ensures predictable timing. Power supplies are designed for stability to prevent unexpected shutdowns.
┌───────────────┐      ┌───────────────┐      ┌───────────────┐
│   Power       │─────▶│     CPU       │─────▶│   Output      │
│   Supply      │      │ (Processor &  │      │   Modules     │
│ (AC to DC)    │      │  Memory)      │      └───────────────┘
└───────────────┘      └───────────────┘           ▲
                         ▲                         │
                         │                         │
                   ┌───────────────┐               │
                   │   Input       │───────────────┘
                   │   Modules     │
                   └───────────────┘
Myth Busters - 4 Common Misconceptions
Quick: Is the CPU in a PLC responsible for directly powering the sensors and actuators? Commit to yes or no.
Common Belief:The CPU provides power directly to sensors and actuators connected to the PLC.
Tap to reveal reality
Reality:The CPU processes signals but does not supply power; power comes from the power supply and sometimes separate field power sources.
Why it matters:Assuming the CPU powers devices can lead to wiring errors and equipment damage.
Quick: Do all input modules handle both digital and analog signals? Commit to yes or no.
Common Belief:All input modules can read any type of signal, digital or analog.
Tap to reveal reality
Reality:Input modules are specialized; some handle only digital signals, others only analog.
Why it matters:Using the wrong module type causes incorrect readings and system failures.
Quick: Does the PLC CPU process inputs and outputs at the exact same time? Commit to yes or no.
Common Belief:The CPU processes all inputs and outputs simultaneously in real time.
Tap to reveal reality
Reality:The CPU processes inputs first, then runs logic, then updates outputs sequentially in a scan cycle.
Why it matters:Misunderstanding timing can cause programming errors and unexpected machine behavior.
Quick: Is a single power supply always enough for critical industrial PLC systems? Commit to yes or no.
Common Belief:One power supply is sufficient for all PLC applications.
Tap to reveal reality
Reality:Critical systems often use redundant power supplies to avoid downtime.
Why it matters:Ignoring redundancy risks costly production stops during power supply failure.
Expert Zone
1
Some CPUs have built-in communication processors to offload network tasks, improving performance.
2
I/O modules can be hot-swappable in modular PLCs, allowing replacement without shutting down the system.
3
Power supplies often include filtering and surge protection tailored for industrial electrical noise.
When NOT to use
Fixed PLC hardware is not suitable when system expansion or customization is needed; modular PLCs or distributed control systems are better alternatives. For very simple control, relay logic or microcontrollers might be more cost-effective.
Production Patterns
In factories, modular PLCs with redundant power supplies and mixed digital/analog I/O modules are common. CPUs often communicate with SCADA systems for monitoring. Hot-swappable I/O modules reduce downtime during maintenance.
Connections
Computer Architecture
PLC hardware architecture builds on the same principles as general computer architecture with CPU, memory, and I/O.
Understanding basic computer architecture helps grasp how PLCs process instructions and interact with hardware.
Electrical Circuit Design
PLC I/O modules interface with electrical circuits, requiring knowledge of voltage, current, and signal types.
Knowing electrical fundamentals ensures correct wiring and prevents damage to PLC hardware.
Human Nervous System
The PLC hardware system functions similarly to the nervous system, with sensors as nerves, CPU as brain, and actuators as muscles.
This biological analogy deepens understanding of signal flow and control in automation.
Common Pitfalls
#1Connecting sensors directly to the CPU without using input modules.
Wrong approach:Wiring a temperature sensor output directly into the CPU pins without an input module.
Correct approach:Connect the sensor output to a dedicated input module, which then communicates with the CPU.
Root cause:Misunderstanding that the CPU cannot read raw sensor signals without proper interface modules.
#2Using a digital input module to read an analog sensor signal.
Wrong approach:Plugging a 4-20mA pressure sensor into a digital input module expecting correct readings.
Correct approach:Use an analog input module designed to read continuous signals like 4-20mA.
Root cause:Confusing signal types and module capabilities.
#3Ignoring power supply specifications and causing voltage drops.
Wrong approach:Using a power supply with insufficient current rating for the PLC and connected devices.
Correct approach:Select a power supply rated to handle the total current demand with margin.
Root cause:Underestimating power requirements leads to unstable PLC operation.
Key Takeaways
A PLC’s hardware architecture includes the CPU, I/O modules, and power supply working together to control machines.
The CPU acts as the brain, processing inputs and controlling outputs based on the program.
I/O modules serve as the PLC’s connection points to sensors and actuators, handling different signal types.
The power supply ensures stable and reliable electrical power, critical for PLC operation.
Understanding these hardware parts and their roles is essential for designing, programming, and troubleshooting PLC systems.

Practice

(1/5)
1. Which part of a PLC acts as the brain, processing all instructions?
easy
A. Input module
B. Power supply
C. CPU
D. Output module

Solution

  1. Step 1: Understand the role of CPU in PLC

    The CPU processes instructions and controls the PLC operation.
  2. Step 2: Compare with other parts

    Power supply provides energy, input modules receive signals, output modules send commands.
  3. Final Answer:

    CPU -> Option C
  4. Quick Check:

    CPU = Brain of PLC [OK]
Hint: CPU is the brain that thinks and controls [OK]
Common Mistakes:
  • Confusing power supply with CPU
  • Thinking input module processes data
  • Mixing output module with CPU
2. Which of the following is the correct symbol for the power supply in a PLC diagram?
easy
A. A box labeled 'PS' or 'Power Supply'
B. A circle labeled 'I/O'
C. An arrow pointing to output devices
D. A rectangle labeled 'CPU'

Solution

  1. Step 1: Identify common PLC diagram symbols

    Power supply is usually shown as a box labeled 'PS' or 'Power Supply'.
  2. Step 2: Eliminate other options

    CPU is labeled 'CPU', I/O is not a circle, arrows show signal flow not power supply.
  3. Final Answer:

    A box labeled 'PS' or 'Power Supply' -> Option A
  4. Quick Check:

    Power supply symbol = Box labeled PS [OK]
Hint: Power supply is labeled 'PS' in diagrams [OK]
Common Mistakes:
  • Choosing CPU box as power supply
  • Confusing arrows with power supply
  • Thinking I/O is power supply symbol
3. Given a PLC with 8 input sensors connected to the input module and 6 output devices connected to the output module, what is the total number of I/O points?
medium
A. 48
B. 8
C. 6
D. 14

Solution

  1. Step 1: Understand I/O points

    I/O points are the sum of input points and output points connected to the PLC.
  2. Step 2: Calculate total I/O points

    8 inputs + 6 outputs = 14 total I/O points.
  3. Final Answer:

    14 -> Option D
  4. Quick Check:

    8 + 6 = 14 I/O points [OK]
Hint: Add input and output counts for total I/O [OK]
Common Mistakes:
  • Counting only inputs
  • Counting only outputs
  • Multiplying inputs by outputs
4. A PLC system is not powering on. Which of the following is the most likely hardware issue?
medium
A. Faulty CPU
B. Disconnected power supply
C. Broken output module
D. Input module error

Solution

  1. Step 1: Analyze symptoms

    PLC not powering on means no power is reaching the system.
  2. Step 2: Identify hardware responsible for power

    The power supply provides energy; if disconnected or faulty, PLC won't start.
  3. Final Answer:

    Disconnected power supply -> Option B
  4. Quick Check:

    No power = Power supply issue [OK]
Hint: No power means check power supply first [OK]
Common Mistakes:
  • Blaming CPU when no power
  • Assuming output module stops power
  • Ignoring power supply connection
5. You need to expand a PLC system to control 12 new sensors and 10 new actuators. Which hardware components must you add to the existing PLC setup?
hard
A. Add input and output modules
B. Add more CPU units
C. Add extra power supplies only
D. Replace the existing CPU with a bigger one

Solution

  1. Step 1: Identify hardware for sensors and actuators

    Sensors connect to input modules; actuators connect to output modules.
  2. Step 2: Determine what to add

    To handle more devices, add input modules for sensors and output modules for actuators.
  3. Step 3: Consider CPU and power supply

    CPU usually handles more modules without replacement; power supply may need upgrade but not always.
  4. Final Answer:

    Add input and output modules -> Option A
  5. Quick Check:

    More devices = Add I/O modules [OK]
Hint: Add I/O modules to handle more devices [OK]
Common Mistakes:
  • Thinking CPU must be replaced
  • Adding only power supplies
  • Adding CPU units instead of modules
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard