Chapter 5
Chapter 5
Chapter 5
• 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.
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
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.