PLC Course • Lesson 1
PLC Basics for Beginners: Inputs, Outputs & Ladder Logic Explained
How does a machine know when to start, when to stop, or when to turn on an indicator? This beginner-friendly lesson explains how a PLC receives information, makes a logical decision, and produces an output command.
Watch the full Xenors PLC lesson above, then use the article below as a written reference and practice guide.
What Is a PLC?
PLC stands for programmable logic controller. Think of it as an industrial controller that executes instructions using information from connected equipment.
The program describes what should happen when particular conditions are met. For example, an indicator might turn on when a sensor detects an object.
Three questions to remember
What information does the controller receive? What decision does the program make? What output command should result?
PLC Inputs and Outputs Explained
Consider a simple example: a button, a PLC and an indicator lamp. The button provides an input signal. The PLC program evaluates that input and determines an output command.
An input brings information into the controller. An output sends a command toward connected equipment.
This describes the logical relationship. It does not show electrical wiring or prove that a particular lamp can connect directly to a particular PLC output. Real connections depend on the hardware, interface and electrical ratings.
Boolean Values: 0 and 1
For our first examples, we use Boolean values. A Boolean value has two possible states: false or true. We represent these as 0 and 1.
We call our conditions A and B, and the output command Q. These are symbolic names for this lesson. They are not physical terminal numbers or a complete PLC address format.
How the PLC Keeps Evaluating Its Program
For the Siemens S7-1200 default cyclic configuration described in this lesson, the cycle begins by updating the physical outputs from the output process image.
The controller then reads the configured inputs into the input process image and executes the cyclic user program. This sequence repeats while the controller operates in RUN mode.
Important
The animation in the video is deliberately slowed for teaching. It does not represent a measured scan time. Other configurations, direct I/O access and interrupt processing can affect the details, so always check the manual for the controller you are using.
What Is Ladder Logic?
A ladder diagram uses horizontal networks, often called rungs, between vertical rails. For these simple examples, read the conditions from left to right and ask whether they create a true logical path to the output instruction.
The contact symbols are software instructions that evaluate bits. They are not physical switches inside the processor.
Normally Open Contact: Q = A
Our first example uses a normally open contact instruction associated with A. For this single-contact rung, Q follows A.
When A = 0, the condition is false and Q = 0. When A = 1, the condition is true and Q = 1.
Q = AThe name “normally open” describes the software instruction. It does not automatically tell you how a physical button is wired.
Normally Closed Contact: Q = NOT A
In this single-contact example, a normally closed instruction tests whether A is false.
When A = 0, Q = 1. When A = 1, Q = 0.
Q = NOT AThis is a logical inversion. Do not confuse it with choosing a physical normally closed switch. First identify what the input bit means, then choose the instruction that tests the condition your program needs.
AND Logic in Ladder Programming
When two normally open contact instructions are placed in series, the output becomes true only when both A and B are true.
If either condition is false, Q = 0. If both conditions are true, Q = 1.
Q = A AND BOR Logic in Ladder Programming
Place two normally open contact instructions on parallel branches. Either branch can provide a true logical path.
If A is true, Q = 1. If B is true, Q = 1. If both are true, Q remains 1. The output becomes zero only when both conditions are false.
Q = A OR BTruth Table for the Four Basic Combinations
| A | B | A AND B | A OR B | NOT A |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 | 0 |
Quick PLC Practice Challenge
Assume A = 1 and B = 0. Predict all three answers before clicking:
- What is
A AND B? - What is
A OR B? - What is
NOT A?
For extra practice, write the four possible combinations of A and B: 0-0, 0-1, 1-0 and 1-1. Calculate A AND B, A OR B and NOT A for each combination.
What You Should Understand After Lesson 1
- A PLC receives information through inputs.
- The PLC program evaluates those conditions.
- Outputs represent commands produced by the program.
- Boolean logic uses true and false states.
- A normally open instruction can make Q follow A.
- A normally closed instruction can implement NOT A.
- Series conditions can represent AND logic.
- Parallel branches can represent OR logic.
The next lesson can build on these foundations with tags, addresses and a simple PLC programming example.
Frequently Asked Questions
What is a PLC in simple words?
A PLC is an industrial controller that reads information from connected equipment, executes a program and produces output commands.
What is the difference between input and output in a PLC?
An input brings information into the controller. An output sends a command from the controller toward connected equipment.
What does a normally open contact do?
In the single-contact example used here, it evaluates true when A is true, so Q follows A.
What does a normally closed contact do?
In this lesson's simple example, it tests whether A is false, producing Q = NOT A.
What is AND logic in ladder logic?
Two true conditions are required. With two normally open instructions in series, Q becomes true only when both A and B are true.
What is OR logic in ladder logic?
Either condition can make the result true. Parallel branches are used in the lesson to represent A OR B.
Video Lesson
Watch on YouTube: PLC Basics for Beginners — Xenors
This page is the written companion to the video lesson and follows the same examples and terminology.









