0% found this document useful (0 votes)
2 views23 pages

Chapter 5

The document discusses programmable logic controllers (PLCs) and programming languages, distinguishing between low-level languages like machine and assembly language, and high-level languages such as C and FORTRAN. It details the IEC 1131-3 standard for PLC programming, which includes ladder diagrams, instruction lists, and functional block diagrams, emphasizing the structure and reading of ladder diagrams. Additionally, it provides examples of ladder programming applications, illustrating how to control outputs based on various input conditions.

Uploaded by

MO COMPANY
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views23 pages

Chapter 5

The document discusses programmable logic controllers (PLCs) and programming languages, distinguishing between low-level languages like machine and assembly language, and high-level languages such as C and FORTRAN. It details the IEC 1131-3 standard for PLC programming, which includes ladder diagrams, instruction lists, and functional block diagrams, emphasizing the structure and reading of ladder diagrams. Additionally, it provides examples of ladder programming applications, illustrating how to control outputs based on various input conditions.

Uploaded by

MO COMPANY
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Dr.

Alaaeldien Mostafa mohamed


Assistant Professor in Department of Electrical
Engineering,
Faculty of Engineering, South Valley University, Egypt.
Programmable logic controllers

Chapter 5

Ladder and functional


block programming
programming language
• Low level languages : are programming languages that are closer to machine code and hardware, making
them more difficult for humans to read and write but more efficient for the computer to execute. They provide
little to no abstraction from the underlying hardware and include:
1. Machine Language – The most fundamental low-level language, consisting of binary code (0s and 1s) that a
computer's CPU can execute directly.
2. Assembly Language – A low-level language that uses symbolic instructions (mnemonics. e.g. (MOV, SUB,
MUL,…) instead of binary, making it slightly easier to program than machine code. Assembly code is
converted into machine language using an assembler.

• High level languages : is a programming language with strong abstraction from the details of
the computer. It use pre-packaged functions, represented by simple words or symbols descriptive of the
function concerned. e.g. C, BASIC, PASCAL, FORTRAN, COBOL.

- usually using a compiler.


programming language

According To the IEC 1131-3 (International Electrotechnical Commission). The IEC 1131-3 programming
languages are:
❑ ladder diagrams (LAD).
❑ instruction list (IL),
❑ sequential function charts (SFC)
❑ structured text (ST).
❑ and function block diagrams (FBD).

• Ladder programming :a means of writing programs which can then be converted into machine code by some
software for use by the PLC microprocessor.
Classical one 5
5
programming language
Ladder programming

Stop-start switch
programming language
PLC ladder programming
The ladder diagram consists of two vertical lines representing the power rails. Circuits are connected as horizontal
lines, i.e. the rungs of the ladder, between these two verticals.
➢ The vertical lines of the diagram represent the power rails between which circuits are connected.
➢ Each rung on the ladder defines one operation in the control process.
➢ A ladder diagram is read from left to right and from top to bottom.
➢ Each rung must start with an input or inputs and must end with at least one output.
➢ Normally open and normally closed switches.
8
8
9
9
Logic Functions
AND

10
Logic Functions
OR

11
NOT

NAND

12
NOR

XOR

13
Latching

14
Ladder diagram
Ladder diagram for Motor on-off, with signal lamps,
Multiple Outputs

- Ladder rung with two outputs

- Ladder rung with two inputs and two outputs

16
Multiple Outputs

17
Logic gate symbols

18
Functional logic gate blocks.
Functional logic gate blocks.

20
Ladder diagram and equivalent functional block diagram.

21
Program examples
- A signal lamp is required to be switched on if a pump is running and the pressure is satisfactory, or if
the lamp test switch is closed.

- As another example, consider a valve which is to be operated to lift a load when a pump is running and either the lift
switch is operated or a switch operated indicating that the load has not already been lifted and is at the bottom of its
lift channel.
Program examples
As another example, consider a system where there has to be no output when any one of four sensors gives an output,
otherwise there is to be an output.

You might also like