SlideShare a Scribd company logo
1Week© Vocational Training Council, Hong Kong.
│ Lecture 3 │
Basic Programmable Logic Controller
(PLC) Programming
EEC3420 Industrial Control
Department of Electrical Engineering
2© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Learning Objectives

Know different types of programming languages used in
PLC

Understand the basic programming techniques of PLC
3© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
IEC 61131 standards for PLC

the use of PLC has been standardized by the IEC

developed with the input of vendors, end-users and
academics, IEC 61131 consists of five parts:

General information

Equipment and test requirements

PLC programming languages

User guidelines

Communications
4© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
The IEC 61131-3 programming language

the international standard for programmable controller
programming languages

specifies the syntax, semantics and display for the
following suite:

Ladder diagram (LD)

Sequential Function Charts (SFC)

Function Block Diagram (FBD)

Structured Text (ST)

Instruction List (IL)
5© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Ladder diagram (LD)

widely spread graphical programming language for
PLCs

a programmatically replacement for relays and coils
which can be combined using AND and OR operations

best suited to compute Boolean expressions

IEC 61131-3 defines a complete LD set of instructions,
consisting of different types of contacts and coils
6© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Ladder diagram (LD)

contacts lead (according to their type) the power
from the left to the right

coils store the incoming value

both, contacts and coils, are assigned to Boolean
variables

an LD network can be supplemented by jumps,
returns, labels and comments
7© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Sequential Function Charts (SFC)

SFC is the IEC 61131 -3 method to program
sequential controls

actions may contain Boolean variables or entire
networks, networks are programmed in Ladder
Diagram, true action associations from several
steps, several concurrent SFC networks in one
diagram
8© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Function Block Diagram (FBD)

FBD defined in IEC 61131-3 consists of different
functions and function blocks that are either linked or
connected to variables

in FBD networks, jumps, labels and returns can be used

similar to the creation of functional diagrams or block
diagrams, with the control logic being created by simply
connecting blocks and elements

frequently used in the process industry due to the flow-
oriented properties of function blocks
9© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Structured Text language (ST)

similar to the high-level language PASCAL or BASIC

uses statements like IF...THEN or FOR…NEXT

concerned compiler is responsible for syntactically
correct insertion of the language constructions

text editor simplifies the programming work through
syntax highlighting

syntax and the set of instructions of ST are optimally
suited for mathematical calculations and data
manipulations
10© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Instruction List (IL)

an assembler type textual programming language

large (and mostly incompatible) sets of instructions
have been created by many vendors

the IEC 61131 Instruction list reduced this set to a
minimum and favours the usage of functions and
function blocks for more complex tasks

code in IL consists of a sequence of instructions
separated by lines, which consist of one operator
("command"), one operand (variable, constant or
instance name) and one optional modifier respectively
11© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Instruction List (IL)

jumps and labels can be used

concerned assembler is responsible for syntactically
correct insertion of the language constructions

text editor simplifies the programming work through
syntax highlighting (colour marking of language
elements)

mainly used if the processing speed of the PLC
program has high priority
12© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Instruction List (IL)
Basic instructions used in Allen Bradley PLC
Mnemonic Function Mnemonic Function
LD Load ANDN And Not
LDN Load Not ORN Or Not
ST Store MPS Memory Push
STN Store Not MPP Memory Pop
AND And MRD Memory Read
OR Or MCR Master Control Relay
ANB And Block
ORB Or Block
Note: The instruction mnemonic may vary across different series of the Allen
Bradley PLCs.
13© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Instruction List (IL)
Basic instructions used in Omron PLC
Mnemonic Function Mnemonic Function
LOAD Load NOP No Operation
LOAD NOT Load Not TR Temp. Register
OUT Out IL InterLock (eq. to MC)
AND And ILC InterLockClear(eq. to
MCR)
AND NOT And Inverted
AND LD And Block
OR Or
OR NOT Or Not
OR LD Or Block
14© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Instruction List (IL)
Basic instructions used in Mitsubishi PLC FX series
Mnemonic Function Mnemonic Function
LD Load NOP No Operation
LDI Load Inverted MPS Memory Push
OUT Out MPP Memory Pop
AND And MRD Memory Read
ANI And Inverted MC Master Control
ANB And Block MCR Master Control Reset
OR Or
ORI Or Inverted
ORB Or Block
15© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
IL, LD and its associated logic equation
operation labeled
with circle 1 is
performed first as it
is the deepest
nested term, and
operations proceed
with circle 2,circle 3
and circle 4
consecutively
(Mitsubishi PLC
codes)
16© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Instruction List (IL)
A list of commonly used IL operators defined in IEC 61131-3
17© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Instruction List (IL)
example of IL using the syntax defined in IEC 61131-3
18© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Instruction List (IL)
example of IL using
the syntax defined
in IEC 61131-3
19© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Instruction List (IL)
example of IL program using
the instructions MPS, MPP &
MRD to implement multiple
outputs using the syntax
defined in IEC 61131-3
20© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Instruction List (IL)
example demonstrating
the use of TR instruction
(similar to MPS, MPP &
MRD instructions defined
in IEC 6113-3) in Omron
PLC
21© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Instruction List (IL)
example
demonstrating
the use of MCR
instruction in
Allen Bradley
PLC
22© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Instruction List (IL)
example
demonstrating the
use of MC & MCR
instructions in
Mitsubishi PLC
(N0 is the nested
number, maximum
7,i.e. a total of 8
nested levels; SP
means “space”)
23© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Instruction List (IL)
example
demonstrating
the use of IL &
ILC instructions
in Omron PLC
24© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Conversion of more complex logic gates
25© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Multiplexer
26© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Time Related Instruction – the Latch
• a latch in ladder logic uses one
instruction to latch, and a
second instruction to unlatch
• the output with an L inside will
turn the output D on when the
input A becomes true
• D will stay on even if A turns off
• D will turn off if input B
becomes true
27© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Time Related Instruction – the Latch
28© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Time Related Instruction – the Latch
a typical timing diagram, ignoring the brief pulse
29© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
The SR (Set-Reset) Flip Flop
Latches are not used universally by all PLC vendors,
others such as Siemens use flip-flops
30© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
The SR (Set-Reset) Flip Flop
the SR Flip Flop may be implemented by using AND-OR
functions
31© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
The SR (Set-Reset) Flip Flop
the SR Flip Flop may also be implemented by using SET-
RESET functions
32© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
The SR (Set-Reset) Flip Flop
implement the SR Flip Flop in Omron PLC
33© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
The Timers
• four fundamental types
• on-delay timer will wait for a set time after a line of
ladder logic has been true before turning on, but it
will turn off immediately
• off-delay timer will turn on immediately when a line
of ladder logic is true, but it will delay before turning
off
• retentive timer will sum all of the on or off time for a
timer, even if the timer never finished
• non-retentive timer will start timing the delay from
zero each time
34© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Operation of a TON (non-retentive) Timer
35© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Operation of a RTO (retentive time on) timer
36© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Operation of a TOF (non-retentive t-off)
timer
37© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Timers in Mitsubishi PLCs
• in FX1N and FX2N series, there are four types of
timers
• T0 ~ T199 are non-retentive time on timer with
timing interval of 100 ms
• T200 ~ T245 are non-retentive time on timer with
timing interval of 10 ms
• T246 ~ T249 are retentive time on timer with timing
interval of 1 ms
• T250 ~ T255 are retentive time on timer with timing
interval of 100 m
38© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Using non-retentive time on timer in
Mitsubishi FX series PLC
39© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Timers in Omron PLC
• in CP series, there are 48 timers/counters with
timing range running
• from 0.1s to 999.9s if it is set as common timer
• or 0.01s to 99.99s if it is set as high speed timer
40© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Timers in Omron PLC
41© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
The Counters
• two basic counter types:
count-up and count-down.
• when the input to a count-up counter goes true the accumulator
value will increase by 1, if the accumulator value reaches the
preset value the counter DN bit will be set
• a count-down counter will decrease the accumulator value until the
preset value is reached
42© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
An up-down counter in Allen Bradley PLC
43© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Counter operation in Mitsubishi PLC
44© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Counter operation in Omron PLC
45© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
The Edge Triggering Instructions
in Mitsubishi FX series PLC, there are two edge
triggering instructions, namely, PLS (PuLSe) and PLF
(PuLse Falling)
46© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
The Edge Triggering Instructions
in Mitsubishi FX series PLC, there are two edge
triggering instructions, namely, PLS (PuLSe) and PLF
(PuLse Falling)
47© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
The Edge Triggering Instructions
in Omron PLC, there are similar edge triggering
instructions, namely, the DIFU (DIFferentiate Up) and the
DIFD (DIFferentiate Down)
48© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
The Edge Triggering Instructions
in Omron PLC, there are similar edge triggering
instructions, namely, the DIFU (DIFferentiate Up) and the
DIFD (DIFferentiate Down)
49© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Applications of Time Related Instructions
The timers and the counters find their
applications in many industrial process controls
50© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Applications of Time Related Instructions
Pulse generator circuit
51© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Applications of Time Related Instructions
Fixed width pulse generator circuit
52© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Applications of Time Related Instructions
Delay off timer - Many PLCs such as Mitsubishi do not
provide delay off timer, but this function can easily be
built by the delay on timer
53© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Applications of Time Related Instructions
Light flasher
54© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Applications of Time Related Instructions
Variable delay on/variable delay off circuit with Mitsubishi
PLC
55© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Applications of Time Related Instructions
Variable delay on/variable delay off circuit with Omron
PLC
56© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Summary of Basic PLC Programming
․ The Instruction List programming language uses stack
operation to perform the operations specified.
․ Logic can be represented with basic Boolean operations
AND, OR, NOT.
․ Boolean equations can be converted to and from ladder
logic or instruction list.
․ The MPS, MPP and MRD enable intermediate results to
be pushed, pop and read to facilitate multiple outputs.
․ Use of the MC/MCR instructions simplifies the
organization of the ladder logic.
․ The time related instructions realize the sequential
functions.
57© Vocational Training Council, Hong Kong.
EEE3420 Industrial Control
Week
Basic PLC Programming
End of Lecture 3
 Revision
Mitsubishi PLC FX series hardware handbook.
Allen Bradley PLC handbook
Omron PLC manual

More Related Content

What's hot

PLC
PLCPLC
Dcs course
Dcs courseDcs course
Dcs course
Mohamed A Hakim
 
PLC BASED AUTOMATED SYSTEM IN PROCESS INDUSTRY (Final Presentation)
PLC BASED AUTOMATED SYSTEM IN PROCESS INDUSTRY (Final Presentation)PLC BASED AUTOMATED SYSTEM IN PROCESS INDUSTRY (Final Presentation)
PLC BASED AUTOMATED SYSTEM IN PROCESS INDUSTRY (Final Presentation)
Shahid Faizee
 
Automation.pptx
 Automation.pptx Automation.pptx
Automation.pptx
SuvenduMondal12
 
8051 Timers and Counters
8051 Timers and Counters8051 Timers and Counters
8051 Timers and Counters
Shreyans Pathak
 
ATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part IATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part I
VineethMP2
 
A comprehensive formal verification solution for ARM based SOC design
A comprehensive formal verification solution for ARM based SOC design A comprehensive formal verification solution for ARM based SOC design
A comprehensive formal verification solution for ARM based SOC design
chiportal
 
Plc Siemens Training Notes
Plc Siemens Training NotesPlc Siemens Training Notes
Plc Siemens Training Notes
plc_course
 
Programmable Logic Controller(PLC)
Programmable Logic Controller(PLC)Programmable Logic Controller(PLC)
Programmable Logic Controller(PLC)
Ahad Hossain
 
CENTUM CS300 R3
CENTUM CS300 R3CENTUM CS300 R3
CENTUM CS300 R3
AhmedAmri23
 
SIEMENS S7-300c.ppt
SIEMENS S7-300c.pptSIEMENS S7-300c.ppt
SIEMENS S7-300c.ppt
Sidharth Mohapatra
 
cplds
cpldscplds
DCS
DCSDCS
Modul PLC Programming.pdf
Modul PLC Programming.pdfModul PLC Programming.pdf
Modul PLC Programming.pdf
MOCHAMAD RIZKY BINTANG ARDYANSYAH
 
Vt training plc_1
Vt training plc_1Vt training plc_1
Vt training plc_1
Kumar Navaneethan
 
MODULE 1 MES.pptx
MODULE 1 MES.pptxMODULE 1 MES.pptx
MODULE 1 MES.pptx
ManvanthBC
 
Practical Distributed Control Systems (DCS) for Engineers and Technicians
Practical Distributed Control Systems (DCS) for Engineers and TechniciansPractical Distributed Control Systems (DCS) for Engineers and Technicians
Practical Distributed Control Systems (DCS) for Engineers and Technicians
Living Online
 
Verilog Lecture5 hust 2014
Verilog Lecture5 hust 2014Verilog Lecture5 hust 2014
Verilog Lecture5 hust 2014
Béo Tú
 
Microcontroller
MicrocontrollerMicrocontroller
Microcontroller
parassini
 
8085 lab
8085 lab8085 lab
8085 lab
Nithin Mohan
 

What's hot (20)

PLC
PLCPLC
PLC
 
Dcs course
Dcs courseDcs course
Dcs course
 
PLC BASED AUTOMATED SYSTEM IN PROCESS INDUSTRY (Final Presentation)
PLC BASED AUTOMATED SYSTEM IN PROCESS INDUSTRY (Final Presentation)PLC BASED AUTOMATED SYSTEM IN PROCESS INDUSTRY (Final Presentation)
PLC BASED AUTOMATED SYSTEM IN PROCESS INDUSTRY (Final Presentation)
 
Automation.pptx
 Automation.pptx Automation.pptx
Automation.pptx
 
8051 Timers and Counters
8051 Timers and Counters8051 Timers and Counters
8051 Timers and Counters
 
ATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part IATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part I
 
A comprehensive formal verification solution for ARM based SOC design
A comprehensive formal verification solution for ARM based SOC design A comprehensive formal verification solution for ARM based SOC design
A comprehensive formal verification solution for ARM based SOC design
 
Plc Siemens Training Notes
Plc Siemens Training NotesPlc Siemens Training Notes
Plc Siemens Training Notes
 
Programmable Logic Controller(PLC)
Programmable Logic Controller(PLC)Programmable Logic Controller(PLC)
Programmable Logic Controller(PLC)
 
CENTUM CS300 R3
CENTUM CS300 R3CENTUM CS300 R3
CENTUM CS300 R3
 
SIEMENS S7-300c.ppt
SIEMENS S7-300c.pptSIEMENS S7-300c.ppt
SIEMENS S7-300c.ppt
 
cplds
cpldscplds
cplds
 
DCS
DCSDCS
DCS
 
Modul PLC Programming.pdf
Modul PLC Programming.pdfModul PLC Programming.pdf
Modul PLC Programming.pdf
 
Vt training plc_1
Vt training plc_1Vt training plc_1
Vt training plc_1
 
MODULE 1 MES.pptx
MODULE 1 MES.pptxMODULE 1 MES.pptx
MODULE 1 MES.pptx
 
Practical Distributed Control Systems (DCS) for Engineers and Technicians
Practical Distributed Control Systems (DCS) for Engineers and TechniciansPractical Distributed Control Systems (DCS) for Engineers and Technicians
Practical Distributed Control Systems (DCS) for Engineers and Technicians
 
Verilog Lecture5 hust 2014
Verilog Lecture5 hust 2014Verilog Lecture5 hust 2014
Verilog Lecture5 hust 2014
 
Microcontroller
MicrocontrollerMicrocontroller
Microcontroller
 
8085 lab
8085 lab8085 lab
8085 lab
 

Similar to Eee3420 lecture03 rev2011

Eee3420 lecture03 rev2011
Eee3420 lecture03 rev2011Eee3420 lecture03 rev2011
Eee3420 lecture03 rev2011
benson215
 
Eee3420 lecture02 rev2011
Eee3420 lecture02 rev2011Eee3420 lecture02 rev2011
Eee3420 lecture02 rev2011
benson215
 
Eee3420 lecture04 rev2011
Eee3420 lecture04 rev2011Eee3420 lecture04 rev2011
Eee3420 lecture04 rev2011
benson215
 
Eee3420 lecture02 rev2011
Eee3420 lecture02 rev2011Eee3420 lecture02 rev2011
Eee3420 lecture02 rev2011
benson215
 
Eee3420 lecture04 rev2011
Eee3420 lecture04 rev2011Eee3420 lecture04 rev2011
Eee3420 lecture04 rev2011
benson215
 
Basics of plc_programming
Basics of plc_programmingBasics of plc_programming
Basics of plc_programming
hamza239523
 
Basics of plc programming
Basics of plc programmingBasics of plc programming
Basics of plc programming
Sergio Barrios
 
Plc 2
Plc 2Plc 2
Shishupal plc
Shishupal plcShishupal plc
Shishupal plc
Shishupal03012015
 
Electrician Training for USAF
Electrician Training for USAFElectrician Training for USAF
Electrician Training for USAF
Business Industrial Network
 
presentation on plc.pptx
presentation on plc.pptxpresentation on plc.pptx
presentation on plc.pptx
NeerajBudhlakoti
 
PLC in Automation
PLC in AutomationPLC in Automation
PLC in Automation
Harshal Chaudhari
 
Programmable logic leseprobe
Programmable logic leseprobeProgrammable logic leseprobe
Programmable logic leseprobe
Enhmandah Hemeelee
 
Programmable logic leseprobe
Programmable logic leseprobeProgrammable logic leseprobe
Programmable logic leseprobe
Enhmandah Hemeelee
 
1913523 vanshika
1913523 vanshika1913523 vanshika
1913523 vanshika
VANSHIKAKUSHWAH
 
Eee3420 lecture05 rev2011
Eee3420 lecture05 rev2011Eee3420 lecture05 rev2011
Eee3420 lecture05 rev2011
benson215
 
PLC: Principios básicos del controlador lógico programable mediante el softwa...
PLC: Principios básicos del controlador lógico programable mediante el softwa...PLC: Principios básicos del controlador lógico programable mediante el softwa...
PLC: Principios básicos del controlador lógico programable mediante el softwa...
SANTIAGO PABLO ALBERTO
 
Eee3420 lecture05 rev2011
Eee3420 lecture05 rev2011Eee3420 lecture05 rev2011
Eee3420 lecture05 rev2011
benson215
 
Plc ppt filke
Plc ppt filkePlc ppt filke
Plc ppt filke
Ajay Rohilla
 
programmable logic controller presentation
programmable logic controller presentationprogrammable logic controller presentation
programmable logic controller presentation
Ashutosh Verma
 

Similar to Eee3420 lecture03 rev2011 (20)

Eee3420 lecture03 rev2011
Eee3420 lecture03 rev2011Eee3420 lecture03 rev2011
Eee3420 lecture03 rev2011
 
Eee3420 lecture02 rev2011
Eee3420 lecture02 rev2011Eee3420 lecture02 rev2011
Eee3420 lecture02 rev2011
 
Eee3420 lecture04 rev2011
Eee3420 lecture04 rev2011Eee3420 lecture04 rev2011
Eee3420 lecture04 rev2011
 
Eee3420 lecture02 rev2011
Eee3420 lecture02 rev2011Eee3420 lecture02 rev2011
Eee3420 lecture02 rev2011
 
Eee3420 lecture04 rev2011
Eee3420 lecture04 rev2011Eee3420 lecture04 rev2011
Eee3420 lecture04 rev2011
 
Basics of plc_programming
Basics of plc_programmingBasics of plc_programming
Basics of plc_programming
 
Basics of plc programming
Basics of plc programmingBasics of plc programming
Basics of plc programming
 
Plc 2
Plc 2Plc 2
Plc 2
 
Shishupal plc
Shishupal plcShishupal plc
Shishupal plc
 
Electrician Training for USAF
Electrician Training for USAFElectrician Training for USAF
Electrician Training for USAF
 
presentation on plc.pptx
presentation on plc.pptxpresentation on plc.pptx
presentation on plc.pptx
 
PLC in Automation
PLC in AutomationPLC in Automation
PLC in Automation
 
Programmable logic leseprobe
Programmable logic leseprobeProgrammable logic leseprobe
Programmable logic leseprobe
 
Programmable logic leseprobe
Programmable logic leseprobeProgrammable logic leseprobe
Programmable logic leseprobe
 
1913523 vanshika
1913523 vanshika1913523 vanshika
1913523 vanshika
 
Eee3420 lecture05 rev2011
Eee3420 lecture05 rev2011Eee3420 lecture05 rev2011
Eee3420 lecture05 rev2011
 
PLC: Principios básicos del controlador lógico programable mediante el softwa...
PLC: Principios básicos del controlador lógico programable mediante el softwa...PLC: Principios básicos del controlador lógico programable mediante el softwa...
PLC: Principios básicos del controlador lógico programable mediante el softwa...
 
Eee3420 lecture05 rev2011
Eee3420 lecture05 rev2011Eee3420 lecture05 rev2011
Eee3420 lecture05 rev2011
 
Plc ppt filke
Plc ppt filkePlc ppt filke
Plc ppt filke
 
programmable logic controller presentation
programmable logic controller presentationprogrammable logic controller presentation
programmable logic controller presentation
 

More from benson215

Chapter 5 - DC-AC Conversion.pdf
Chapter 5 - DC-AC Conversion.pdfChapter 5 - DC-AC Conversion.pdf
Chapter 5 - DC-AC Conversion.pdf
benson215
 
Chapter 0 - Introduction.pdf
Chapter 0 - Introduction.pdfChapter 0 - Introduction.pdf
Chapter 0 - Introduction.pdf
benson215
 
Chapter 1 - PWM DC-DC Converter.pdf
Chapter 1 - PWM DC-DC Converter.pdfChapter 1 - PWM DC-DC Converter.pdf
Chapter 1 - PWM DC-DC Converter.pdf
benson215
 
Chapter 2 - Isolated DC-DC Converter.pdf
Chapter 2 - Isolated DC-DC Converter.pdfChapter 2 - Isolated DC-DC Converter.pdf
Chapter 2 - Isolated DC-DC Converter.pdf
benson215
 
Chapter 3 - Resonant-mode DC-DC Converter.pdf
Chapter 3 - Resonant-mode DC-DC Converter.pdfChapter 3 - Resonant-mode DC-DC Converter.pdf
Chapter 3 - Resonant-mode DC-DC Converter.pdf
benson215
 
Chapter 6 - Modelling and Control of Converters.pdf
Chapter 6 - Modelling and Control of Converters.pdfChapter 6 - Modelling and Control of Converters.pdf
Chapter 6 - Modelling and Control of Converters.pdf
benson215
 
Chapter 4 - AC-DC Conversion.pdf
Chapter 4 - AC-DC Conversion.pdfChapter 4 - AC-DC Conversion.pdf
Chapter 4 - AC-DC Conversion.pdf
benson215
 
Chapter 7 - EMI.pdf
Chapter 7 - EMI.pdfChapter 7 - EMI.pdf
Chapter 7 - EMI.pdf
benson215
 
3. ac drive (misc.)
3. ac drive (misc.)3. ac drive (misc.)
3. ac drive (misc.)
benson215
 
2. ac drive (common inverter drive)
2. ac drive (common inverter drive)2. ac drive (common inverter drive)
2. ac drive (common inverter drive)
benson215
 
1. revision on 3 phase conventional inverter
1. revision on 3 phase conventional inverter1. revision on 3 phase conventional inverter
1. revision on 3 phase conventional inverter
benson215
 
2. dc drive
2. dc drive2. dc drive
2. dc drive
benson215
 
1. revision on 3 phase controlled rectifier
1. revision on 3 phase controlled rectifier1. revision on 3 phase controlled rectifier
1. revision on 3 phase controlled rectifier
benson215
 
2. motor drive dynamic
2. motor drive dynamic2. motor drive dynamic
2. motor drive dynamic
benson215
 
5. two phase servo motor
5. two phase servo motor5. two phase servo motor
5. two phase servo motor
benson215
 
4. linear motor basics
4. linear motor basics4. linear motor basics
4. linear motor basics
benson215
 
2. brushless dc motors
2. brushless dc motors2. brushless dc motors
2. brushless dc motors
benson215
 
1. servo basic
1. servo basic1. servo basic
1. servo basic
benson215
 
3. relutance and hysteresis motor
3. relutance and hysteresis motor3. relutance and hysteresis motor
3. relutance and hysteresis motor
benson215
 
Eee3420 lecture08 rev2011
Eee3420 lecture08 rev2011Eee3420 lecture08 rev2011
Eee3420 lecture08 rev2011
benson215
 

More from benson215 (20)

Chapter 5 - DC-AC Conversion.pdf
Chapter 5 - DC-AC Conversion.pdfChapter 5 - DC-AC Conversion.pdf
Chapter 5 - DC-AC Conversion.pdf
 
Chapter 0 - Introduction.pdf
Chapter 0 - Introduction.pdfChapter 0 - Introduction.pdf
Chapter 0 - Introduction.pdf
 
Chapter 1 - PWM DC-DC Converter.pdf
Chapter 1 - PWM DC-DC Converter.pdfChapter 1 - PWM DC-DC Converter.pdf
Chapter 1 - PWM DC-DC Converter.pdf
 
Chapter 2 - Isolated DC-DC Converter.pdf
Chapter 2 - Isolated DC-DC Converter.pdfChapter 2 - Isolated DC-DC Converter.pdf
Chapter 2 - Isolated DC-DC Converter.pdf
 
Chapter 3 - Resonant-mode DC-DC Converter.pdf
Chapter 3 - Resonant-mode DC-DC Converter.pdfChapter 3 - Resonant-mode DC-DC Converter.pdf
Chapter 3 - Resonant-mode DC-DC Converter.pdf
 
Chapter 6 - Modelling and Control of Converters.pdf
Chapter 6 - Modelling and Control of Converters.pdfChapter 6 - Modelling and Control of Converters.pdf
Chapter 6 - Modelling and Control of Converters.pdf
 
Chapter 4 - AC-DC Conversion.pdf
Chapter 4 - AC-DC Conversion.pdfChapter 4 - AC-DC Conversion.pdf
Chapter 4 - AC-DC Conversion.pdf
 
Chapter 7 - EMI.pdf
Chapter 7 - EMI.pdfChapter 7 - EMI.pdf
Chapter 7 - EMI.pdf
 
3. ac drive (misc.)
3. ac drive (misc.)3. ac drive (misc.)
3. ac drive (misc.)
 
2. ac drive (common inverter drive)
2. ac drive (common inverter drive)2. ac drive (common inverter drive)
2. ac drive (common inverter drive)
 
1. revision on 3 phase conventional inverter
1. revision on 3 phase conventional inverter1. revision on 3 phase conventional inverter
1. revision on 3 phase conventional inverter
 
2. dc drive
2. dc drive2. dc drive
2. dc drive
 
1. revision on 3 phase controlled rectifier
1. revision on 3 phase controlled rectifier1. revision on 3 phase controlled rectifier
1. revision on 3 phase controlled rectifier
 
2. motor drive dynamic
2. motor drive dynamic2. motor drive dynamic
2. motor drive dynamic
 
5. two phase servo motor
5. two phase servo motor5. two phase servo motor
5. two phase servo motor
 
4. linear motor basics
4. linear motor basics4. linear motor basics
4. linear motor basics
 
2. brushless dc motors
2. brushless dc motors2. brushless dc motors
2. brushless dc motors
 
1. servo basic
1. servo basic1. servo basic
1. servo basic
 
3. relutance and hysteresis motor
3. relutance and hysteresis motor3. relutance and hysteresis motor
3. relutance and hysteresis motor
 
Eee3420 lecture08 rev2011
Eee3420 lecture08 rev2011Eee3420 lecture08 rev2011
Eee3420 lecture08 rev2011
 

Recently uploaded

SENTIMENT ANALYSIS ON PPT AND Project template_.pptx
SENTIMENT ANALYSIS ON PPT AND Project template_.pptxSENTIMENT ANALYSIS ON PPT AND Project template_.pptx
SENTIMENT ANALYSIS ON PPT AND Project template_.pptx
b0754201
 
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Transcat
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
VANDANAMOHANGOUDA
 
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENTNATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
Addu25809
 
Accident detection system project report.pdf
Accident detection system project report.pdfAccident detection system project report.pdf
Accident detection system project report.pdf
Kamal Acharya
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 
Pressure Relief valve used in flow line to release the over pressure at our d...
Pressure Relief valve used in flow line to release the over pressure at our d...Pressure Relief valve used in flow line to release the over pressure at our d...
Pressure Relief valve used in flow line to release the over pressure at our d...
cannyengineerings
 
Blood finder application project report (1).pdf
Blood finder application project report (1).pdfBlood finder application project report (1).pdf
Blood finder application project report (1).pdf
Kamal Acharya
 
Mechatronics material . Mechanical engineering
Mechatronics material . Mechanical engineeringMechatronics material . Mechanical engineering
Mechatronics material . Mechanical engineering
sachin chaurasia
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
aryanpankaj78
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
upoux
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
upoux
 
Height and depth gauge linear metrology.pdf
Height and depth gauge linear metrology.pdfHeight and depth gauge linear metrology.pdf
Height and depth gauge linear metrology.pdf
q30122000
 
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
MadhavJungKarki
 
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
Paris Salesforce Developer Group
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
ijaia
 
OOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming languageOOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming language
PreethaV16
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
PriyankaKilaniya
 
Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...
Prakhyath Rai
 

Recently uploaded (20)

SENTIMENT ANALYSIS ON PPT AND Project template_.pptx
SENTIMENT ANALYSIS ON PPT AND Project template_.pptxSENTIMENT ANALYSIS ON PPT AND Project template_.pptx
SENTIMENT ANALYSIS ON PPT AND Project template_.pptx
 
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
Tools & Techniques for Commissioning and Maintaining PV Systems W-Animations ...
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
 
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENTNATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
 
Accident detection system project report.pdf
Accident detection system project report.pdfAccident detection system project report.pdf
Accident detection system project report.pdf
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 
Pressure Relief valve used in flow line to release the over pressure at our d...
Pressure Relief valve used in flow line to release the over pressure at our d...Pressure Relief valve used in flow line to release the over pressure at our d...
Pressure Relief valve used in flow line to release the over pressure at our d...
 
Blood finder application project report (1).pdf
Blood finder application project report (1).pdfBlood finder application project report (1).pdf
Blood finder application project report (1).pdf
 
Mechatronics material . Mechanical engineering
Mechatronics material . Mechanical engineeringMechatronics material . Mechanical engineering
Mechatronics material . Mechanical engineering
 
Digital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptxDigital Twins Computer Networking Paper Presentation.pptx
Digital Twins Computer Networking Paper Presentation.pptx
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
 
Height and depth gauge linear metrology.pdf
Height and depth gauge linear metrology.pdfHeight and depth gauge linear metrology.pdf
Height and depth gauge linear metrology.pdf
 
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
 
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
AI + Data Community Tour - Build the Next Generation of Apps with the Einstei...
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
OOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming languageOOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming language
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
 
Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...Software Engineering and Project Management - Software Testing + Agile Method...
Software Engineering and Project Management - Software Testing + Agile Method...
 

Eee3420 lecture03 rev2011

  • 1. 1Week© Vocational Training Council, Hong Kong. │ Lecture 3 │ Basic Programmable Logic Controller (PLC) Programming EEC3420 Industrial Control Department of Electrical Engineering
  • 2. 2© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Learning Objectives  Know different types of programming languages used in PLC  Understand the basic programming techniques of PLC
  • 3. 3© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week IEC 61131 standards for PLC  the use of PLC has been standardized by the IEC  developed with the input of vendors, end-users and academics, IEC 61131 consists of five parts:  General information  Equipment and test requirements  PLC programming languages  User guidelines  Communications
  • 4. 4© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week The IEC 61131-3 programming language  the international standard for programmable controller programming languages  specifies the syntax, semantics and display for the following suite:  Ladder diagram (LD)  Sequential Function Charts (SFC)  Function Block Diagram (FBD)  Structured Text (ST)  Instruction List (IL)
  • 5. 5© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Ladder diagram (LD)  widely spread graphical programming language for PLCs  a programmatically replacement for relays and coils which can be combined using AND and OR operations  best suited to compute Boolean expressions  IEC 61131-3 defines a complete LD set of instructions, consisting of different types of contacts and coils
  • 6. 6© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Ladder diagram (LD)  contacts lead (according to their type) the power from the left to the right  coils store the incoming value  both, contacts and coils, are assigned to Boolean variables  an LD network can be supplemented by jumps, returns, labels and comments
  • 7. 7© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Sequential Function Charts (SFC)  SFC is the IEC 61131 -3 method to program sequential controls  actions may contain Boolean variables or entire networks, networks are programmed in Ladder Diagram, true action associations from several steps, several concurrent SFC networks in one diagram
  • 8. 8© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Function Block Diagram (FBD)  FBD defined in IEC 61131-3 consists of different functions and function blocks that are either linked or connected to variables  in FBD networks, jumps, labels and returns can be used  similar to the creation of functional diagrams or block diagrams, with the control logic being created by simply connecting blocks and elements  frequently used in the process industry due to the flow- oriented properties of function blocks
  • 9. 9© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Structured Text language (ST)  similar to the high-level language PASCAL or BASIC  uses statements like IF...THEN or FOR…NEXT  concerned compiler is responsible for syntactically correct insertion of the language constructions  text editor simplifies the programming work through syntax highlighting  syntax and the set of instructions of ST are optimally suited for mathematical calculations and data manipulations
  • 10. 10© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Instruction List (IL)  an assembler type textual programming language  large (and mostly incompatible) sets of instructions have been created by many vendors  the IEC 61131 Instruction list reduced this set to a minimum and favours the usage of functions and function blocks for more complex tasks  code in IL consists of a sequence of instructions separated by lines, which consist of one operator ("command"), one operand (variable, constant or instance name) and one optional modifier respectively
  • 11. 11© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Instruction List (IL)  jumps and labels can be used  concerned assembler is responsible for syntactically correct insertion of the language constructions  text editor simplifies the programming work through syntax highlighting (colour marking of language elements)  mainly used if the processing speed of the PLC program has high priority
  • 12. 12© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Instruction List (IL) Basic instructions used in Allen Bradley PLC Mnemonic Function Mnemonic Function LD Load ANDN And Not LDN Load Not ORN Or Not ST Store MPS Memory Push STN Store Not MPP Memory Pop AND And MRD Memory Read OR Or MCR Master Control Relay ANB And Block ORB Or Block Note: The instruction mnemonic may vary across different series of the Allen Bradley PLCs.
  • 13. 13© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Instruction List (IL) Basic instructions used in Omron PLC Mnemonic Function Mnemonic Function LOAD Load NOP No Operation LOAD NOT Load Not TR Temp. Register OUT Out IL InterLock (eq. to MC) AND And ILC InterLockClear(eq. to MCR) AND NOT And Inverted AND LD And Block OR Or OR NOT Or Not OR LD Or Block
  • 14. 14© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Instruction List (IL) Basic instructions used in Mitsubishi PLC FX series Mnemonic Function Mnemonic Function LD Load NOP No Operation LDI Load Inverted MPS Memory Push OUT Out MPP Memory Pop AND And MRD Memory Read ANI And Inverted MC Master Control ANB And Block MCR Master Control Reset OR Or ORI Or Inverted ORB Or Block
  • 15. 15© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week IL, LD and its associated logic equation operation labeled with circle 1 is performed first as it is the deepest nested term, and operations proceed with circle 2,circle 3 and circle 4 consecutively (Mitsubishi PLC codes)
  • 16. 16© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Instruction List (IL) A list of commonly used IL operators defined in IEC 61131-3
  • 17. 17© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Instruction List (IL) example of IL using the syntax defined in IEC 61131-3
  • 18. 18© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Instruction List (IL) example of IL using the syntax defined in IEC 61131-3
  • 19. 19© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Instruction List (IL) example of IL program using the instructions MPS, MPP & MRD to implement multiple outputs using the syntax defined in IEC 61131-3
  • 20. 20© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Instruction List (IL) example demonstrating the use of TR instruction (similar to MPS, MPP & MRD instructions defined in IEC 6113-3) in Omron PLC
  • 21. 21© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Instruction List (IL) example demonstrating the use of MCR instruction in Allen Bradley PLC
  • 22. 22© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Instruction List (IL) example demonstrating the use of MC & MCR instructions in Mitsubishi PLC (N0 is the nested number, maximum 7,i.e. a total of 8 nested levels; SP means “space”)
  • 23. 23© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Instruction List (IL) example demonstrating the use of IL & ILC instructions in Omron PLC
  • 24. 24© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Conversion of more complex logic gates
  • 25. 25© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Multiplexer
  • 26. 26© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Time Related Instruction – the Latch • a latch in ladder logic uses one instruction to latch, and a second instruction to unlatch • the output with an L inside will turn the output D on when the input A becomes true • D will stay on even if A turns off • D will turn off if input B becomes true
  • 27. 27© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Time Related Instruction – the Latch
  • 28. 28© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Time Related Instruction – the Latch a typical timing diagram, ignoring the brief pulse
  • 29. 29© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week The SR (Set-Reset) Flip Flop Latches are not used universally by all PLC vendors, others such as Siemens use flip-flops
  • 30. 30© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week The SR (Set-Reset) Flip Flop the SR Flip Flop may be implemented by using AND-OR functions
  • 31. 31© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week The SR (Set-Reset) Flip Flop the SR Flip Flop may also be implemented by using SET- RESET functions
  • 32. 32© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week The SR (Set-Reset) Flip Flop implement the SR Flip Flop in Omron PLC
  • 33. 33© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week The Timers • four fundamental types • on-delay timer will wait for a set time after a line of ladder logic has been true before turning on, but it will turn off immediately • off-delay timer will turn on immediately when a line of ladder logic is true, but it will delay before turning off • retentive timer will sum all of the on or off time for a timer, even if the timer never finished • non-retentive timer will start timing the delay from zero each time
  • 34. 34© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Operation of a TON (non-retentive) Timer
  • 35. 35© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Operation of a RTO (retentive time on) timer
  • 36. 36© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Operation of a TOF (non-retentive t-off) timer
  • 37. 37© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Timers in Mitsubishi PLCs • in FX1N and FX2N series, there are four types of timers • T0 ~ T199 are non-retentive time on timer with timing interval of 100 ms • T200 ~ T245 are non-retentive time on timer with timing interval of 10 ms • T246 ~ T249 are retentive time on timer with timing interval of 1 ms • T250 ~ T255 are retentive time on timer with timing interval of 100 m
  • 38. 38© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Using non-retentive time on timer in Mitsubishi FX series PLC
  • 39. 39© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Timers in Omron PLC • in CP series, there are 48 timers/counters with timing range running • from 0.1s to 999.9s if it is set as common timer • or 0.01s to 99.99s if it is set as high speed timer
  • 40. 40© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Timers in Omron PLC
  • 41. 41© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week The Counters • two basic counter types: count-up and count-down. • when the input to a count-up counter goes true the accumulator value will increase by 1, if the accumulator value reaches the preset value the counter DN bit will be set • a count-down counter will decrease the accumulator value until the preset value is reached
  • 42. 42© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week An up-down counter in Allen Bradley PLC
  • 43. 43© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Counter operation in Mitsubishi PLC
  • 44. 44© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Counter operation in Omron PLC
  • 45. 45© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week The Edge Triggering Instructions in Mitsubishi FX series PLC, there are two edge triggering instructions, namely, PLS (PuLSe) and PLF (PuLse Falling)
  • 46. 46© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week The Edge Triggering Instructions in Mitsubishi FX series PLC, there are two edge triggering instructions, namely, PLS (PuLSe) and PLF (PuLse Falling)
  • 47. 47© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week The Edge Triggering Instructions in Omron PLC, there are similar edge triggering instructions, namely, the DIFU (DIFferentiate Up) and the DIFD (DIFferentiate Down)
  • 48. 48© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week The Edge Triggering Instructions in Omron PLC, there are similar edge triggering instructions, namely, the DIFU (DIFferentiate Up) and the DIFD (DIFferentiate Down)
  • 49. 49© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Applications of Time Related Instructions The timers and the counters find their applications in many industrial process controls
  • 50. 50© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Applications of Time Related Instructions Pulse generator circuit
  • 51. 51© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Applications of Time Related Instructions Fixed width pulse generator circuit
  • 52. 52© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Applications of Time Related Instructions Delay off timer - Many PLCs such as Mitsubishi do not provide delay off timer, but this function can easily be built by the delay on timer
  • 53. 53© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Applications of Time Related Instructions Light flasher
  • 54. 54© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Applications of Time Related Instructions Variable delay on/variable delay off circuit with Mitsubishi PLC
  • 55. 55© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Applications of Time Related Instructions Variable delay on/variable delay off circuit with Omron PLC
  • 56. 56© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Summary of Basic PLC Programming ․ The Instruction List programming language uses stack operation to perform the operations specified. ․ Logic can be represented with basic Boolean operations AND, OR, NOT. ․ Boolean equations can be converted to and from ladder logic or instruction list. ․ The MPS, MPP and MRD enable intermediate results to be pushed, pop and read to facilitate multiple outputs. ․ Use of the MC/MCR instructions simplifies the organization of the ladder logic. ․ The time related instructions realize the sequential functions.
  • 57. 57© Vocational Training Council, Hong Kong. EEE3420 Industrial Control Week Basic PLC Programming End of Lecture 3  Revision Mitsubishi PLC FX series hardware handbook. Allen Bradley PLC handbook Omron PLC manual