PLCs

Basics of Ladder Logic 221

Basics of Ladder Logic provides an overview of the basic principles, structure, and symbols of ladder logic programming. This class introduces the components of ladder logic programming language used in PLCs and the functions, ladder diagrams, logic gates, and common input and output instructions used in PLC programs.

PLC-based automation is continually growing, and ladder logic is the primary or most common language used in PLC programming. Having foundational knowledge of basic ladder logic components and functions will aid in programmer and operator efficiency and familiarity with PLC programs.

  • Difficulty Intermediate

  • Format Online

  • Number of Lessons 17

  • Language English

TO GET STARTED SPEAK WITH A SPECIALIST AT 1.866.706.8665

Or fill out this form and a specialist will contact you shortly

Course Outline
  • Introduction to Ladder Logic
  • Field Devices and PLC Modules
  • Programming Language and Logic
  • Review: Ladder Logic Introduction
  • Ladder Logic Diagrams
  • Rules for Ladder Diagrams
  • Input Instructions
  • Output Instructions
  • Review: Inputs and Outputs
  • Logic Gates
  • AND
  • OR
  • NOT
  • Review: AND, OR, and NOT Gates
  • Other Logic Gates
  • Other Logic Instructions
  • Final Review
Objectives
  • Describe ladder logic in PLCs.
  • Describe PLC field devices and I/O modules.
  • Describe the functionality of programming language and logic for PLCs.
  • Describe PLC ladder diagrams.
  • List rules for constructing ladder logic diagrams.
  • Describe ladder logic input instructions.
  • Describe ladder logic output instructions.
  • Describe logic gates.
  • Describe the AND gate.
  • Describe the OR gate.
  • Describe the NOT gate.
  • Describe other logic gates.
  • Describe other logic instructions.
Glossary
Vocabulary Term
Definition

addresses

The unique identification of the location of the data for an input device, output device, or other saved data in the CPU's memory. Addresses are listed alongside associated devices or data in a PLC ladder diagram.

AND

A basic logic gate that acts as a logical combination. An AND gate requires all inputs to be true for the output to be true.

automation

The use of self-regulated equipment, processes, or systems that meet manufacturing requirements with limited human intervention. Many automation operations use PLCs for control.

binary digit

The smallest unit of information on a computer. Binary digits, or bits, consist of 1s and 0s.

binary number system

A method of representing numbers that has 2 as its base and uses only the digits 0 and 1. PLC programs use a binary number system.

Boolean algebra

A branch of mathematics that uses true and false values in logical equations. Boolean algebra is used in many programming languages.

Boolean equation

A mathematical statement that combines binary values to determine a true or false value. Boolean equations are the basis for logic gates in PLC programming.

branches

A logical and parallel path coming off a rung of a PLC ladder diagram. Branches contain additional program instructions for a PLC.

central processing unit

CPU. The microprocessor device inside a computer that controls system activities. The central processing unit executes a PLC program and performs all logic activities for the system.

comments

Text that describes the rung operation. Comments are placed mostly above inputs and outputs.

conditions

An input instruction in a PLC ladder diagram. A condition must be met by PLC components in order to result in an action.

contact

A physical device or data bit that either opens or closes depending on the associated program instruction. Contacts send signals to outputs.

counter

A set of program instructions that allows a PLC to keep track of actions or events in a process and to respond when a specific count is reached. Counters can be programmed to count up to or down from a preset value.

data file

The area of a CPU's memory that contains the status of inputs, outputs, and program instructions for sequencers, timers, and counters. A data file also stores binary information for input/output instructions.

end

A ladder logic instruction used to end the program. The end instruction is displayed on the last rung of each ladder logic diagram.

examine if closed

XIC. An input instruction that prompts a CPU to look for an on, or true, condition in a referenced input device. The examine if closed instruction is logically true if the associated input device is on.

examine if open

XIO. An input instruction that prompts a CPU to look for an off, or false, condition in a referenced input device. The examine if open instruction is logically true if the associated input device is off.

Exclusive NOR

XNOR. A logic gate in which the output is true only if both inputs are true or both inputs are false. An exclusive NOR logic gate is the combination of the exclusive OR (XOR) and NOT logic gates.

Exclusive OR

XOR. A logic gate in which the output is true only if either input is true but not when both inputs are true. An Exclusive OR logic gate has both two normal inputs and their inversions.

false

A logical condition that exists when the associated device is off. A false condition fails to provide a continuous logical path on a ladder rung.

field devices

A component that connects to an input/output module on a PLC. Each field device, or input/output device, corresponds to a program instruction.

graphical language

A type of programming language that uses symbols and figures to develop a program. Graphical languages include ladder logic and functional block diagrams.

input devices

A field device on a PLC that responds to a condition in a process and sends a signal to the input module. Input devices include limit switches and push buttons.

input instructions

A command in a ladder logic program that communicates with the PLC's processor to examine a contact. Input instructions are used to execute output instructions.

input modules

The portion of a PLC that contains input connection points that allow an input device to connect to the PLC. Input modules send input signals to the central processing unit.

internal relays

Software instructions used within a PLC program that simulate the physical connections of relay circuits. Internal relays have an address in the program memory.

inverter

A basic logic gate that reverses the true/false condition of an input. An inverter in ladder logic can be an XIO instruction.

ladder diagram

A representation of a ladder logic program that uses symbols to represent the on or off status of input/output devices. Ladder diagrams also contain internal program instructions, such as counter, timer, or sequencer instructions.

ladder logic

A graphical PLC programming language that uses simple symbols to indicate the status of input and output devices. Ladder logic displays program instructions in a ladder diagram.

lamps

An output device that lights up when energized. Lamps are used in many manufacturing processes.

latches

When a program instruction maintains its on or off condition until it receives its next instruction. An XIC instruction latches an output latch instruction.

limit switches

A type of mechanical contact that detects the presence or absence of an object. Limit switches are input devices that send signals to a PLC program.

logic gates

A basic building block of a PLC program that instructs the CPU to perform a logical operation on a true or false input to produce a true or false output. Logic gates use binary digits to express true and false conditions.

logical continuity

The flow of logic or power on a rung in PLC programming. Logical continuity always reads a program from left to right.

memory

The portion of a computer where data is stored. Memory storage can be built into the central processing unit of a PLC.

memory address table

A diagram displaying the logical 0s and 1s of a system's memory address. A memory address table records the input signals.

motors

An output device that converts one form of energy into another. Motors are controlled by PLCs in the industrial field.

NAND

A basic logic gate that triggers a false output only if both inputs are true. A NAND logic gate is a combination of the AND and NOT logic gates.

neutral

A material or structure that is not electrically charged. A neutral charge is represented by the right rail of the ladder logic diagram.

NOR

A basic logic gate that triggers a true output only if both inputs are false. A NOR logic gate is a combination of the OR and NOT logic gates.

normally closed instruction

An input instruction that prompts a CPU to look for an off, or false, condition in a referenced input device. Normally closed instructions are known as XIO instructions.

normally open instruction

An input instruction that prompts a CPU to look for an on, or true, condition in a referenced input device. Normally open instructions are known as XIC instructions.

NOT

A basic logic gate that reverses the true/false condition of an input. A NOT logic gate requires only one input.

OR

A basic logic gate that excludes one of two or more entities among a group of entities based on the conditions of the logical statement. An OR logic gate requires one or more inputs to be true in order for the output to be true.

output devices

A field device on a PLC that performs a desired action after receiving a signal from the output module. Output devices include components such as motors, lamps, and solenoids.

output energize

OTE. An output instruction that is true if all input instructions on a rung are true and will be false if any input instructions on the rung are false. An output energize instruction that is true will energize the associated output device.

output instructions

A command in a ladder logic program that communicates with the PLC's processor to energize an output. Output instructions cause a PLC to operate corresponding output devices.

output latch

OTL. An output instruction that turns on an output device and allows the device to remain on even if the rung changes to false. The output latch instruction cannot turn a device off and must always appear with an output unlatch instruction.

output modules

The portion of a PLC that contains output connection points that allow output devices to connect to the PLC and receive signals. Output modules send signals to output devices.

output unlatch

OTU. An output instruction that turns off the device that was turned on by an output latch instruction. The output unlatch instruction cannot turn a device on and must always appear with an output latch instruction.

PLC

Programmable logic controller. A processor-driven device that uses logic-based software to provide electrical control to machines. PLCs are used in factory automation.

positive

An electric charge with a shortage of electrons. A positive charge is represented by the left rail of a ladder logic diagram.

power supply

The device that provides power to a PLC's CPU and I/O modules. The power supply is represented as rails on a ladder logic diagram.

program

The instructions entered into a central processing unit that direct the PLC to control input/output devices. A program contains lines of instruction.

programmable logic controllers

PLCs. A processor-driven device that uses logic-based software to provide electrical control to machines. Programmable logic controllers are used in factory automation.

programmers

A person responsible for writing a program. PLC programmers develop programs for automated tasks.

programming languages

A set of symbols and rules used to present information to a processor. Programming languages are used to create programs for a PLC.

push buttons

A type of mechanical contact that controls some aspect of a machine or process. A push button is a common type of field input device.

rails

A vertical line in a PLC ladder diagram that represents a power supply line in the circuit. Rails in a PLC ladder diagram are on the left and right side.

rungs

A horizontal line in a PLC ladder diagram that contains program instructions. Rungs are read from left to right.

sequencer

A set of program instructions that determines the order in which a PLC performs a group of processes. Sequencer instructions can be time-driven or event-driven.

signal

A current that carries data from one device to another. Signals are sent to and from physical devices.

software

The programs and instructions that a processor-driven device carries out. Software allows programming devices to communicate with PLCs.

solenoids

A device that converts electrical energy into mechanical energy. Solenoids are common output devices.

status bits

A data type in the memory address table that can be set but is not associated with a physical input or output device. Status bits can be used for different instructions.

switches

A control device that opens and closes contacts in a circuit. Switches are a type of field input device.

timers

A set of program instructions that allows a PLC to control and monitor time-dependent aspects of machines and processes. Timer instructions can delay an output from turning off or on for a preset amount of time.

true

A logical condition that exists when the associated device is on. A true condition in an input device triggers an on condition in an output device.

truth table

A display showing all the possible true and false combinations for a logic gate and the corresponding output for each combination. Truth tables use binary digits to express true/false conditions.

XIC

Examine if closed. An input instruction that prompts a CPU to look for an on, or true, condition in a referenced input device. The XIC instruction is logically true if the associated input device is on.

XIO

Examine if open. An input instruction that prompts a CPU to look for an off, or false, condition in a referenced input device. The XIO instruction is logically true if the associated input device is off.