0
0
FreertosHow-ToBeginner · 3 min read

How to Implement OR Logic in Ladder Diagram for PLC Programming

To implement OR logic in a ladder diagram, place input contacts in parallel branches on the same rung. This means if any one of the parallel contacts is true (closed), the output coil will energize, representing the OR condition.
📐

Syntax

In ladder diagrams, OR logic is created by placing input contacts in parallel on the same rung. Each contact represents a condition. If any contact closes, the current flows to energize the output coil.

Here’s what each part means:

  • --[ ]--: Normally open contact representing an input condition.
  • Parallel branches: Multiple --[ ]-- contacts side by side, connected to the same output coil.
  • ( ): Output coil energized when any input contact is true.
plaintext
  |--[ ]--|
  |       |
--|       |--( )
  |--[ ]--|
💻

Example

This example shows two input switches, Start and Reset, connected in parallel to control a motor output coil. The motor turns on if either Start or Reset is pressed.

plaintext
  |--[ Start ]--|
  |             |
--|             |--( Motor )
  |--[ Reset ]--|
Output
If Start = ON or Reset = ON, then Motor = ON
⚠️

Common Pitfalls

One common mistake is placing input contacts in series instead of parallel, which creates AND logic instead of OR. Another is misunderstanding that all parallel contacts must connect to the same output coil on the same rung.

Wrong way (AND logic):

--[ Start ]--[ Reset ]--( Motor )

Right way (OR logic):

  |--[ Start ]--|
  |             |
--|             |--( Motor )
  |--[ Reset ]--|
📊

Quick Reference

ConceptLadder Diagram SymbolDescription
Normally Open Contact--[ ]--Input condition that closes when true
Parallel BranchesMultiple --[ ]-- side by sideRepresents OR logic between inputs
Output Coil--( )Device energized when input logic is true

Key Takeaways

OR logic in ladder diagrams is done by placing input contacts in parallel on the same rung.
If any parallel contact closes, the output coil energizes, representing OR condition.
Avoid placing contacts in series when OR logic is intended, as that creates AND logic.
All parallel contacts must connect to the same output coil on the same rung.
Use clear labeling of inputs and outputs to avoid confusion in ladder logic.