PLC

PLC programming languages – Basic ladder logic

Based on International Standard IEC-61131-3, the PLC programming language has 5 types, namely:

  • Ladder Diagram (LD)
  • Function Block Diagram (FBD)
  • Sequential Function Chart (SFC)
  • Structure Text (ST)
  • Instruction List (IL)

Not all PLCs support the five programming languages ​​above. Some only support LD, some also support LD, FBD, SFC, ST depending on the PLC we use.

The following are the programming languages ​​used by some PLC brands:

  • Allen bradley PLC-5 & SLC-500: Ladder Diagram (LD)
  • Allen Bradley Logix 5000 family: Ladder Diagram (LD), Function Block Diagram (FBD), Sequential Function Chart (SFC), Structure Text (ST)
  • Omron CX-Programmer V8.1: Ladder Diagram (LD), Function Block Diagram (FBD), Sequential Function Chart (SFC)
  • Schneider: Ladder Diagram (LD), Function Block Diagram (FBD), Sequential Function Chart (SFC)
  • Siemens: Ladder Diagram (LD), Function Block Diagram (FBD), Sequential Function Chart (SFC), Instruction List (IL)

The programming language discussed in this article is ladder logic. There are three basic elements of the organization related to ladder logic:

  • Rungs
  • Instructions
  • Branches

Rungs:

The Ladder logic instructions are written on a rungs. During the program scan, the processor scans from left to right, one by one ladder from top to bottom.
Key Points about Rung:

  • Rungs are scanned from 0 to highest number (top to bottom).
  • Rungs are read from left to right.
  • The new ladder will be numbered automatically according to where the ladder is placed in the logic ladder file.
  • The last stage in a ladder logic file automatically contains an END instruction

INSTRUCTION:

Ladder logic instruction is divided into 2 parts:

  • Input instructions:

Displayed on the left side of the ladder Check, comparison, or specific conditions

  • Output instructions :

Shown on the right side Do something action.

  • Key points about instructions: Input instructions are displayed on the left side of the window while the instructions output is always displayed on the right side of the window.
  • A single does not require input of any instructions, but must contain at least one output instruction.

BRANCHES

Branches are used in the ladder logic to create different paths that directly read the state of inputs and outputs.

Bit of instructions:
The instructions bits are instructions for the ladder logic instructions that extract or change a single bit from the data table files. Following are three types of instructions:

  • Conditional input instructions
  • Non-retentive output instructions
  • Retentive bit output instructions

Sivaranjith

Instrumentation Engineer

Related Articles

Back to top button