Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Captcha Click on image to update the captcha .

Login

Register Now

register content

PLC Ladder Diagram

PLC Instructions

You organize ladder diagram as rungs on a ladder and put instructions on each rung.

There are two basic types of instructions:

Input instruction: An instruction that checks, compares, or examines specific conditions in your machine or process.
Output instruction: An instruction that takes some action, such as turn on a device, turn off a device, copy data, or calculate a value.

plc programming img 5f197e0a1929f plc

A branch is two or more instructions in parallel.

plc programming img 5f197ee5ef139 plc

There is no limit to the number of parallel branch levels that you can enter. This example shows a parallel branch with five levels. The main rung is the first branch level, followed by four additional branches.

Rung condition

The controller evaluates ladder instructions based on the rung condition preceding the instruction (rung-condition-in).

plc programming img 5f197ff89291b plc

Only create instructions that affect the rung-condition-in of subsequent instructions on the rung.

  •  If the rung-condition-in to an input instruction is true, the controller evaluates the instruction and sets the rung-condition-out to match the results of the evaluation.
  •  If the instruction evaluates to true, the rung-condition-out is true.
  •  If the instruction evaluates to false, the rung-condition-out is false.
  •  An output instruction does not change the rung-condition-out.
  •  If the rung-condition-in to an output instruction is true, the rung-condition-out is set to true.
  •  If the rung-condition-in to an output instruction is false, the rung-condition-out is set to false.

Write ladder logic

Writing ladder logic requires that you choose the input and output instructions, and choose the tag names for operands.

  1. Identify the conditions to check and separate them from the action to take for the rung.
  2. Choose the appropriate input instruction for each condition and the appropriate output instruction for each action.

The examples in this chapter use two simple instructions to help you learn how to write ladder diagram logic. The rules that you learn for these instructions apply to all other instructions.

plc programming img 5f19837f2909e plc

Arrange the input instructions

Determine how to arrange the input instructions on the rung, as shown below.

To check multiple input conditions when:

All conditions must be met in order to take action.
For example, If condition_1 AND condition_2 AND condition_3

Arrange the input instructions:

In series >>>

plc programming img 5f1984cdab254 plc

To check multiple input conditions when:

Any one of several conditions must be met in order to take action. For example, If condition_1 OR condition_2 OR condition_3…

Arrange the input instructions:

In parallel>>>

plc programming img 5f19857a1e188 plc

To check multiple input conditions when:

There is a combination of the above. For example:
If condition_1 AND condition_2… OR
If condition_3 AND condition_2…

Arrange the input instructions:

In combination >>>

plc programming img 5f1985c0ab2c5 plc

The controller executes all instructions on a rung regardless of their rung-condition-in. For optimal performance of a series of instructions, sequence the instructions from most likely to be false on the left to least likely to be false on the right.

plc programming img 5f19866733014 plc

When the controller finds a false instruction, it executes the remaining instructions in the series with their rung-condition-in set to false. Typically, an instruction executes faster when its rung-condition-in (rung) is false rather than true.

Arrange the output instructions

Place at least one output instruction to the right of the input instructions. You can enter multiple output instructions on a rung of logic:

Option:

Place the output instructions in sequence on the rung (serial).

Example:

plc programming img 5f1987222aa37 plc

Option:

Place the output instructions in branches (parallel).

Example:

plc programming img 5f19875e76716 plc

Option:

Place the output instructions between input instructions. The last instruction on the rung must be an output instruction.

Example:

plc programming img 5f1987a6cd5b0 plc