PLC Blog
← Back to Blog

Ladder Logic Programming Basics

January 20, 2024

Programming
# Ladder Logic Programming Basics Ladder Logic is the most widely used programming language for PLCs. It represents a program in a graphical format that mimics relay logic diagrams. ## What is Ladder Logic? Ladder Logic, also known as Relay Ladder Logic or RLL, represents control logic in a format similar to electrical relay circuits. The name comes from its appearanceβ€”it looks like a ladder with two vertical rails and horizontal rungs. ## Basic Components ### Contacts (Inputs) - **Normally Open (NO)**: Represented by two vertical lines. Contact closes when input signal is active. - **Normally Closed (NC)**: Represented by two vertical lines with a diagonal line through them. Contact opens when input signal is active. ### Coils (Outputs) - **Standard Coil**: Energizes an output when the logic is true. - **Set/Reset Coils**: Used to maintain states between scans. - **Counters and Timers**: Special coils for counting and timing functions. ## Basic Logic Operations ### AND Logic ``` Input1 β€”|β€”β€” AND β€”β€”( )β€”β€” Output Input2 β€”|β€”β€” ``` Output energizes only when both inputs are active. ### OR Logic ``` Input1 β€”|——┐ |β€”β€”β€” OR β€”β€”( )β€”β€” Output Input2 β€”|β€”β€”β”˜ ``` Output energizes when either or both inputs are active. ### NOT Logic ``` Input1 β€”|/|β€”β€” NOT β€”β€”( )β€”β€” Output ``` Output energizes when input is NOT active. ## Scan Cycle The PLC executes ladder logic in a continuous loop called a scan cycle: 1. **Input Scan**: Read all input modules 2. **Logic Scan**: Execute the ladder logic 3. **Output Scan**: Update all output modules 4. **Housekeeping**: Perform diagnostic checks ## Programming Tips - Keep programs simple and well-organized - Use meaningful names for variables and tags - Document your logic with comments - Test thoroughly before deployment - Always have emergency stop functionality Ladder Logic's intuitive graphical format makes it accessible to both electricians and engineers, making it the industry standard for PLC programming.

Β© 2026 PLC Blog. All rights reserved.

Dedicated to Programmable Logic Controller (PLC) topics and industrial automation.