Unlike ordinary programming languages, PLC programs are written as ladder diagrams.
Because ladder diagrams can be understood visually, they are relatively easy to learn even for beginners.
This page briefly explains how ladder logic is written.
* You can learn more advanced topics with the simulator on this site.
First, here is the most basic ladder diagram.
A ladder diagram is read from left to right. When the condition on the left is satisfied, it proceeds to the right.
The two symbols in the diagram are called an N.O. contact (normally open contact) and a coil.
An N.O. contact satisfies its condition when its device is ON, and processing proceeds to the right. When the device is OFF, processing does not proceed past it.
A coil turns its device ON if the conditions up to the coil are satisfied.
Written as a program, it looks like this:
Next is a circuit called an AND circuit.
An AND circuit has two or more contacts on one row and checks whether all the conditions are satisfied at the same time.
In a ladder diagram, it is written like this:
As a formula:
Next is a circuit called an OR circuit.
It checks whether any one of two or more conditions is satisfied.
In a ladder diagram, it is written like this:
As a formula:
You will come to understand all of this through the simulations.
For now, it is fine to just get a rough idea.
Next, let's learn about the devices that make up ladder logic.