Professional Documents
Culture Documents
Plcprogramming 120105074227 Phpapp02
Plcprogramming 120105074227 Phpapp02
• Ladder
• Boolean
• Grafcet
2
LADDER LANGUAGE
3
Enhanced functional block format
4
PLC Instruction Set Classifications
5
These instruction categories include:
• ladder relay
• timing
• counting
• program/flow control
• arithmetic
• data manipulation
• data transfer
• special function (sequencers)
• network communication
6
BOOLEAN
7
GRAFCET
10
LADDER DIAGRAM FORMAT
12
Monitoring device showing
13
Functional block instructions
14
A functional block instruction that is always enabled
To make a block active at all times without any driving logic, the
user can omit all contact logic and place a continuity line in the
block during programming
15
The ladder rung matrix
16
Ladder matrix
17
•One rule, which is present in almost all PLCs, prevents
reverse (i.e., right-to-left) power flow in a ladder rung.
21
OUTPUT COIL
22
LATCH/UNLATCH OUTPUT COIL
23
ONE-SHOT OUTPUT
24
TRANSITIONAL CONTACT
25
Ladder rung where all outputs
turn ON in the same scan
26
Ladder rung where the outputs
turn ON in different scans
27
TIMER INSTRUCTIONS
28
29
Hardwired circuit with time-delay
and instantaneous contacts
30
ON-DELAY ENERGIZE/ DE-ENERGIZE TIMER
31
OFF-DELAY ENERGIZE/ DE-ENERGIZE TIMER
32
COUNTER INSTRUCTIONS
33
Counter function block with
up, down, and reset counter
instructions
34
Automatically resetting counter
35
Program/flow control instructions
36
37
38
Example of an MCR instruction
39
Example of a jump to instruction
40
PLC with assigned subroutines at
the end of the program
41
User-created subroutine area
42
ARITHMETIC INSTRUCTIONS
43
Arithmetic Instructions
44
DATA MANIPULATION INSTRUCTIONS
45
DATA TRANSFER INSTRUCTIONS
46
SPECIAL FUNCTION INSTRUCTIONS
47
A sequencer (SEQ) block
48
Sequencer instruction block
49
DIAGNOSTICS
A diagnostics (DIAG) block instruction compares two
memory blocks.
50
PID functional block
51
52
Operation of a network output coil and a network
contact instructions.
Note that contact 20 in PLC #2 is a local contact
53
Network Send/Receive
54
BOOLEAN MNEMONICS
It is a PLC language based primarily on the Boolean operators
AND, OR, and NOT.
55
INTRODUCTION TO THE IEC 1131
56
It defines two graphical languages and two text-based
languages for use in PLC programming.
Graphical languages
• ladder diagrams (LD)
• function block diagram (FBD)
Text-based languages
• instruction list (IL)
• structured text (ST)
57
The five IEC 61131-3 Programming languages
Function Block Diagram (FBD) graphical languages Sequential Flow Chart (SFC)
AUTO CALC1
START STEP
DI CALC PUMP
bFB(A:=1, B:=„OK‟);
Instruction List (IL) Z := X - INT_TO_REAL (bFB.OUT1);
A: LD %IX1 (* PUSH BUTTON *) IF Z>57.0 THEN aFB(A:=0, B:=“ERR”);
ANDN %MX5 (* NOT INHIBITED *) ELSE aFB(A:=1, B:=“Z is OK”);
ST %QX2 (* FAN ON *) END_IF
58
59
Limit switch addressed
(a) a standard PLC environment (b) an IEC 1131-3 environment
60
•Ladder diagram language (LD) uses a
standardized set of ladder programming
symbols to implement control functions.
63
64
SEQUENTIAL FUNCTION CHARTS (SFC)
65
The SFC programming framework contains three main
elements that organize the control program:
• steps
A step is a stage in the control process.
• transitions
After the PLC executes a step/action, it must receive
a transition before it will proceed to the next step.
• actions
Each step may or may not have an action associated
with it. An action is a set of control instructions
prompting the PLC to execute a certain control
function during that step.
66
Sequential function chart of
a mixing process
67
Comparison of an SFC
diagram and a flowchart
68
Macrostep within an SFC program
69
Graphic symbols used in SFCs
70
(a) Level 1 SFC level 2 SFC
71
PROGRAMMING NORMALLY
CLOSED TRANSITIONS
72
DIVERGENCES AND CONVERGENCES
73
OR Divergences and Convergences
74
AND Divergences and Convergences
75
76
General PLC architecture
RS 232 Ethernet
extension
bus
parallel bus buffers
77
I/O bus network block diagram
78
Connection between a PLC, a local area
network, and an I/O bus network
79
TYPES OF I/O BUS NETWORKS
81
Network and protocol standards
82
InterBus-S I/O network interface
connected to a Siemens PLC
83
An InterBus-S network with a
host controller interface to a PLC
84
ASI bit-wide device bus network
85
I/O bus network using the
CANbus and ASI networks
86
Process bus configuration
87
Bridge connecting low-speed and
high-speed Fieldbus networks
88
Profibus hierarchy
89
DeviceNet I/O bus port connections
90
91
92