PLC Sequence Control Course
PLC Sequence Control Course
Essential Knowledge
Ladder Diagram
Ladder diagram (ladder logic) is the programming language adopted by most PLCs. If you already understand relay circuits, you should be able to grasp ladder diagrams quickly. To make it as easy as possible to follow, we will explain by converting relay circuits into ladder diagrams step by step.
Created: 2010
Updated: April 24, 2026
- What is a Ladder Diagram?
- Explaining the Ladder Diagram
- Output Method
- Video Tutorial
- Practical Learning Methods
- Frequently Asked Questions (FAQ)
What is a Ladder Diagram?
A ladder diagram is the programming language used in PLCs (programmable logic controllers / sequencers), and it is written in a style similar to relay circuits. Ladder diagrams are essential when learning sequence control, and most general-purpose PLCs adopt ladder diagrams as their standard language. In other words, if you want to control machinery and equipment with a PLC, you must understand ladder diagrams — without this knowledge, PLC-based control is virtually impossible.
Compared to other programming languages, ladder diagrams are somewhat unique. As a result, people who are used to writing programs in BASIC or C may find them difficult to approach at first. Ladder diagrams are an extension of relay control — it is a bit like drawing relay circuits on a computer screen. This site aims to explain things in a way that is easy to understand even for beginners (apologies if anything is unclear), but please make sure you have at least a basic understanding of what relay control is before proceeding.
If you are completely new to relay control, please start by reading the Relay Control section. If you are a total beginner, we recommend starting from the About Relays section.
Explaining the Ladder Diagram
Now let's explain ladder diagrams. We will use the relay circuit introduced at the end of the Relay Control section as our example.
First, we remove the sensor input section from the relay circuit. When inputting signals to a PLC, you do not need a circuit that drives a relay via a sensor as you would in relay control. For example, by connecting a sensor directly to a terminal called X0, you only need to write the contact "X0" in the program to make it work. The connection method will be explained later. For now, let's look at the circuit.
We have removed the sensor section from the relay circuit explained at the end of the Relay Control section. Next, we change the symbols in this circuit. If you can design this relay circuit with ease, you should be able to understand ladder diagrams quickly.
Please change the shape of the contacts and coils as shown above. At this point, the contacts for push-button switches and relay contacts use the same symbol. Also, remove the upper power supply circuit, but keep the left and right vertical bars. The result looks like this:
Anyone who has studied ladder diagrams even once should recognize this. A ladder diagram is essentially a relay circuit built and edited easily on a computer screen. People who previously struggled with relay circuit wiring will find that ladder diagrams make the same work much simpler. Even when I design simple control circuits, I sometimes sketch them as ladder diagrams rather than relay circuits — the symbols are simpler and cleaner.
First, notice that "CR" has changed to "M". This "M" is called an internal relay. Inside the PLC there are many virtual relays, and by using M you can utilize them. We use these relays to create self-holding (latching) circuits. Each M has a number (address), and depending on the PLC's specifications, you can use as many as you need. Also, while a physical relay coil could only drive around 4 contacts, a PLC allows you to use an unlimited number of contacts. However, each coil can only be written once as an output coil.
※ While it is technically possible to write the same coil multiple times, this creates a "double coil" situation where the last one written (the one with the highest step number) takes priority. This can cause unstable operation and is not recommended.
Output Method
However, the program alone is not enough to make things move. It only works inside the program. You need the PLC (sequencer) to produce actual output signals. We add output coils to achieve this. The sections labeled "Y0" through "Y2" have been added.
Let me explain in order. Inputs from sensors and push-button switches use the "X" contact. This is because sensors are connected to the "X" terminals on the PLC. The connection method will be explained in detail later, but here a push-button switch is connected to terminal "X0", the stop button to "X1", the photoelectric sensor to "X2", and the cylinder sensor to "X3". Pressing the push-button switch turns "X0" ON. When the photoelectric sensor activates, "X2" turns ON.
Next, the outputs. The PLC processes the logic internally, but unless it outputs to the outside, cylinders and other devices will not operate. The coil that drives external output is "Y". Just like the input "X", the automatic lamp is connected to PLC output terminal "Y0". The PLC's output terminals work like relay contacts, so they function as switches.
As shown here, inputs use "X" and outputs use "Y" — these symbols are predefined and must be memorized. The internal relay mentioned earlier is also predefined as "M".
Now let me explain how the circuit operates. First, when push-button "X0" is pressed, "M1" activates. "M1" is self-holding (latched). Looking at the output section, you can see that when "M1" is ON, "Y0" turns ON. This causes the automatic lamp to light up. What about the stop lamp "Y1"? It is connected to the normally-closed (b-contact) of "M1". This means "Y1" lights up when "M1" is OFF, and turns off when "M1" is ON — "Y0" and "Y1" operate in exactly opposite ways.
※ Note: in this example, you could replace the b-contact of "M1" in the Y1 rung with the b-contact of "Y0" and achieve the same result — but only when Y1 is meant to operate completely opposite to Y0.
Now consider the state where "M1" is ON as the auto-run state. In this state, activating the photoelectric sensor turns "M2" ON. This is the cylinder advance command. As long as this output is active, the cylinder advances. When the output turns OFF, the cylinder retracts. (A solenoid valve with this type of behavior is called a single solenoid.) "M2" turns ON, which turns "Y2" ON, causing the cylinder to advance. Once the cylinder advances fully, the cylinder sensor "X3" turns ON. When "X3" turns ON while the cylinder advance command "M2" is active, "M3" turns ON.
When "M3" turns ON, the b-contact of "M3" in the self-holding circuit of "M2" opens, causing "M2" to turn OFF. When "M2" turns OFF, "M3" also turns OFF. Furthermore, when "M2" turns OFF, the cylinder advance output "Y2" also turns OFF, causing the cylinder to retract. This completes one cycle.
This has been a simplified explanation, but this is the foundation of ladder circuit programming. With practice, it will become second nature. One important note: since ladder circuits consist only of coils and numbers, it is essential to add comments — otherwise it becomes impossible to tell what each part does. How to write comments will be explained later, but always make sure to add them.
This marks the end of the essential knowledge section for learning sequence control. From here you will step into the world of sequence control. There will be times when things don't work as expected or you make mistakes. In those moments, don't give up — try again and again, and embrace the struggle as part of learning. Working through these challenges is the fastest path to improvement.
Now let's move on to the explanation of sequence control.
Practical Learning Methods
For those who already understand the basics, we have prepared a course using GX WORKS2. In particular, the Ladder Diagram Advanced Course 2 allows you to study full-scale ladder diagram programming as long as you have the software installed — no additional teaching materials are required. Be sure to give it a try. This course was of course developed by this site (PLC Sequence Control Course).
If you already understand the basics of ladder diagrams, try actually building circuits in the Simple Circuit Construction section.
If you have both GX WORKS2 and GT Designer3, there is also a course available for you. See Advanced Course 2 for details.
If you have not yet installed the software for editing ladder diagrams, the next page explains how to do so.
※ This site uses Mitsubishi products, including Mitsubishi software.
For those who want to learn sequence control more efficiently — must-see!! There is a course kit developed by this PLC Sequence Control Course. It can be operated with Mitsubishi software alone, so you can learn by actually building circuits. Highly recommended with confidence.
Frequently Asked Questions (FAQ)
The "Introduction to Sequence Control and Circuit Diagrams" is available as a Kindle edition (e-book). If you prefer a paperback, please select the paperback format, or purchase from the top page.




