Ladder logic
Welcome! I am excited to help you master Ladder Logic. Before we dive into the rungs and rails, I would love to learn a bit about your background so we can tailor this to your needs.
Are you an engineering student, an electrician, or looking to get into industrial automation?
I want to get into industrial automation
It is great to have you here! Industrial automation is an incredibly rewarding field, and mastering ladder logic is the perfect gateway to program the controllers that run modern factories.
What is Ladder Logic?
A basic empty ladder logic diagram with two vertical power rails and two horizontal rungs.
Continue to the electrical relay analogy
From Hardware to Software
Explain how a physical relay behaves inside the PLC program
The Virtual Relay
Let's look at how the PLC actually runs this program. Would you like to see how the PLC's internal CPU processes these inputs, solves your code, and updates the outputs in a continuous loop?
Continue to the PLC CPU scan cycle
The Scan Cycle: How the PLC Thinks
A three-stage circular PLC scan cycle.
- Read Inputs: The PLC looks at the physical terminal strip where your real-world pushbuttons, sensors, and limit switches are wired. It copies their ON or OFF statuses into a dedicated digital memory table.
- Execute Program: The CPU runs through your ladder logic program from left-to-right, rung-by-rung, starting at the very top. It uses the input statuses it just copied in step 1 to solve the math and logic, figuring out which virtual "coils" should turn on or off. However, it doesn't turn the physical devices on yet; it just updates their desired status in its memory.
- Update Outputs: Finally, the PLC writes those updated status values from its memory out to the physical terminals where your real-world motors, valves, and indicator lights are wired, physically turning them on or off.
Now that you know how the PLC executes the program in the background, we're ready to look at the actual symbols you'll use to build these rungs. Shall we move on to exploring normally open and normally closed contacts?