Ladder Logic for Control Systems

Introduction to Ladder Logic

  • Ladder Logic is a programming language for Programmable Logic Controllers (PLCs).
  • Allen-Bradley PLCs are commonly used in the industry.
  • Ladder diagrams consist of rungs with input sensor instructions in series with an output (e.g., pilot light).
  • Program execution is from left to right and top to bottom.

Basic Components

  • Contacts and coils are basic symbols.
  • Key symbols: Examine If Closed (XIC), Examine If Open (XIO), and Output Energize (OTE).
    • Contacts: Symbolic representations of physical input devices.
    • Types: Normally Open (NO) and Normally Closed (NC).
    • Coils: Represent output devices.
    • Activated when the circuit is complete.

Fundamental Ladder Diagram Instructions

Examine If Open (XIO)

  • Operates like a normally closed relay contact.
  • Checks if the contact is open by examining a memory bit.
  • 0 corresponds to a true status, and 1 corresponds to a false status.

Examine If Close (XIC)

  • Checks if the contact is closed.
  • A memory bit is set to 1 for true (on) and 0 for false (off).
  • If the memory bit is 1 (true), it allows rung continuity.

Output Energize (OTE)

  • Operates like a relay coil and is associated with a memory bit.
  • Signals the PLC to energize (switch on) or de-energize (switch off) the output.
  • Energized if a true logic path exists in the rung.

Ladder Logic Latch

  • Uses SET (S) and RESET (R) symbols to maintain an output state.

Basic Switches

Push Buttons

  • Manual control switches for start/stop operations.
    • NO for start, NC for stop.

Proximity Sensors

  • Detect objects without contact.
    • Types: Inductive, capacitive, photoelectric.
  • Act like contacts based on object proximity.

Limit Switches

  • Detect the limit of an object’s movement.
    • Can be NO or NC.

Timing Scalantis

Timers

  • Control the duration of events.
    • TON (Timer On Delay): Output true after preset time when input is true.
    • TOF (Timer Off Delay): Output true until timer times out when input is false.
    • RTO (Retentive Timer On): Remembers accumulated time.

Counters

  • Count occurrences of events.
    • CTU (Count Up): Increments count on false to true transition.
    • CTD (Count Down): Decrements count on false to true transition.

Ladder Logic Environment

  • PLC programming often operates in a Windows environment.
  • Allen Bradley RSLogix software is used to develop ladder logic programs.

Ladder Logic Implementation

  • User program represents a logic circuit, not an electrical circuit.
  • Logic continuity is important for establishing an output.

Example of Basic PLC Program

  • PBstop and OLswitch instructions should be connected in parallel for correct motor control.
  • These normally closed (NC) instructions activate when the motor should stop.
  • Parallel connection ensures the motor stops if either condition occurs.