Professional Documents
Culture Documents
INTRODUCTION TO
ASSESSMENT
Practical Test 1 20% Practical Test 2 20% Assignment 20% Final Exam 30% Key Qualification 10%
MODULE OBJECTIVES
Upon completion of this course, the participants will be able to: explain the basic ideas on PLC such as PLC components signaling, I/O addressing and program execution; apply PLC programming method such as LAD, FBD and STL using Siemens STEP 7 software; define and explain Siemens STEP 7 PLC software such as RS, timers, counters, load and transfer commands, comparisons and arithmetic functions.
Topic 1
Basic Principle of Control Technology
PLC
PROGRAMMABLE LOGIC CONTROL (PLC): (PLC): A digital electronic device that uses a programmable memory to store instructions and to implement specific functions such as logic, sequence, timing, counting and arithmetic to control machines and process.
Definition of Control
What is CONTROL? CONTROL is the process in a system in which one or several input variables influence other variables
DIN 19226
INFORMATION
COMMANDS
C O N T R O L
S Y S T E M
SENSORS P L A N T
ACTUATORS
CONTROL SYSTEM
PLC
K1 0V
K1 N
Hardwire
PLC
Comparison
Hardwired control systems The functions are determined by the physical wiring. Programmable control system The functions are determined by a program stored in the memory. The control functions can be changed simply by changing the program. Consist of a control device, to which all the sensors and actuators are connected.
HISTORY OF PLC
During the late 1960s, General Motors (USA) was interested in the computer application to replace the hardwire systems. Bedford Associates (Modicon) and Allen Bradley responded to General Motors. The name given was Programmable Controllers or PC. Programmable Logic Controller or PLC was a registered trademark of the Allen Bradley. Later, PC was used for Personal Computer and to avoid confusion PLC for Programmable Controller and PC for a personal computer.
CONVEYOR LINE
WORKSTATION #1
WS #2
WS #3
FLOW OF MATERIAL
WS #1
WS #2
WS #3
0 0 3 2
PLC
INPUT MODULES
OUTPUT MODULES
Input Devices
Output Devices
PLC
Input Connections
Input card
Input Devices
Output Connections
Output Devices
Logic
Input/output Connections
I N P U T S
PLC Logic
O U T P U T S
WS #1
WS #2
WS #3
0 0 32
PLC
CPU
Four basic types of CPU operations: Input and output operation Arithmetic and logic Reading or changing contents of memory locations Jump operations
CPU
INTERNAL PROGRAM MEMORY (RAM)
ACCUMULATOR
PROCESSOR
PII PIQ
SERIAL INTERFACE
CPU
The CPU reads in input signal states, processes the control program and controls the outputs. The CPU provides internal Memory, timers and counters. Restart procedure can be preset and errors can be diagnosed using the CPUs LEDs. The overall Reset on the CPU is used to delete the contents of the RAM. A PG or a Memory submodule is used to transfer the control program to the CPU.
Program Memory
Program memory
RAM (Random Access Memory) the memory contents can be read and written (modified) memory contents will be lost when the supply voltage fails
ROM (Read Only Memory) the memory contents can be read, but cannot be modified
Semiconductor RAM
Memory Submodules
EPROM SUBMODULE An ultraviolet erasing device is used to delete the contents of the submodule EEPROM SUBMODULE EEPROM submodule can be programmed or erased using a programmer RAM SUBMODULE Can be used in addition to program storage; and used to test a control program during system startup
Hardware Summary
PG External power supply
PS951
CPU
Input module
Output module
Input devices
Output devices
Program Memory
Processor
Power Supply
Steps of Operation
The sensors are connected to the INPUT MODULES The processor in the CPU MODULE executes the program and scans the individual input for presence or absence of voltage Depending on the state of the inputs, the processor directs the OUTPUT MODULES to switch voltages The ACTUATORS or ANNUNCIATORS are switched ON or OFF according to the voltage states
= =
The sensor is
1 0 0 1
Types of Addressing
Absolute example: A = A = Call
Symbol MOTOR_FOR COUNT SYSTEM_ON SYSTEM_ON M_FORW
example: A = A = Call
Motor moves forward Count bottles Switch system ON Indicator: System is ON Pushbutton: Motor forward
Max. 24 character
Max. 80 character
Q 4.0
( )
The graphical representation of a control task using symbols to DIN 19239 Very similar to traditional circuit diagrams, but the current paths are arranged horizontally instead of vertically
&
Q 4.0
The graphical representation of a control task using symbols to DIN 40700 and DIN 19239 Inputs are arranged on the left side while outputs on the right
FBD
OPERAND + OPERATION
STL
OPERATION + OPERAND
I 0.0
M 80.0
I 0.0 M 80.0
&
A I 0.0 A M 80.0
OPERATION + OPERAND
Q 4.0 ( )
Q 4.0
= Q 4.0
Program Execution
OB1
Linear program scanning
OB = Organization Block Every program must have OB1 When the PLC is set to run, the PLC will look for OB1 only in the user memory and execute it Other blocks can be called from OB1 with the jump command
Cyclic program execution
OB1 A I 0.0 A I 0.1 = Q 4.0 : : : BE
Complex tasks are subdivided into clearly differentiated subtasks i.e. the program is divided into small, easy-to-follow program blocks, organized according to different functions
OB1 JU FC 1 JU FC 4 : : : BE
Structured programming FC 1
Network 1 A I 0.6 A I 0.7 = Q 4.2 Network 2 A I 0.7 A I 0.5 = Q 4.3 BE
Network 1 A I 0.6 A I 0.7 = Q 4.2 Network 2 A I 0.7 A I 0.5 = Q 4.3 Network 3 A Q 4.2 A I 0.2 = Q 5.5 BE
OB 1 Network 1 JU FC 1 JU FC 4 BE
FC 4
Network 1 A Q 4.2 A I 0.2 = Q 5.5 BE
Program Execution
24 VDC
I 0.0 I 0.1 Input module
Process input image
Output module
GND
1 0
A I 0.0 A I 0.1
0
Q 4.0
P I I
1
P I Q
1
Q 4.3
I 0.5
1
I 0.7
Input cycle
Program execution
Output cycle
OB1
The contents of PIQ are transferred to the output module at the end of OB1
PIQ
BLOCK TYPES
ORGANISATION BLOCKS (OB) Interface between the operating system and the user program FUNCTIONS (FC) - Contains a partial functionality of the program DATA BLOCKS (DB) Are data areas of the user program in which user data are managed in a structured manner SYSTEM FUNCTION BLOCKS (SFB), SYSTEM FUNCTIONS (SFC) SFBs and SFCs are integrated in the S7 CPU and allow you access to some important system functions FUNCTION BLOCKS (FB) - FBs are blocks with a memory which you can program yourself INSTANCE DATA BLOCKS (DB) - Instance DBs are associated with the block when an FB/SFB is called. They are created automatically during compilation
The Operand Areas (for Siemens S5-95U PLC) S5 I (Input) Interface from the process to the programmable controller Q (Output) Interface from programmable controller to the process M (Memory/Flag) Memory for intermediate results of binary operations T (Timer) Memory for implementing timers C (Counter) Memory for implementing counters
Output (Q)
Topic 3
Programming Basic Functions
Assignment Lists
Program Structure
( )
FBD I 0.0 I 0.1 STL
&
Q 4.0
OR Operation
LAD I 0.0 I 0.1 Q 4.0
( )
STL
>= 1
Q 4.0
O I 0.0 O I 0. 1 = Q 4.0
( )
I 0.2 FBD I 0.0 I 0.1 I 0.2 I 0.3 I 0.3 STL A I 0.0 A I 0.1 O A I 0.2 A I 0.3 = Q 4.0
I 0.1
I 0.3
&
>= 1
Q 4.0
&
( )
I 0.2 FBD I 0.0 I 0.1 I 0.2 I 0.3 I 0.3 STL A( O I 0.0 O I 0.2 ) A( O I 0.1 O I 0.3 ) = Q 4.0
I 0.1
I 0.3
>= 1
&
>= 1
Q 4.0
The sensor is
Signal state
activated not activated activated not activated activated not activated activated not activated
1 0 0 1 0 1 1 0
Latching Output
S3
K2 S4
S1 S2
K1
K2
K1
RS Memory Function
S3
K2 S4
S2
S1
K1
K2
S
SET Priority / Dominant SET
( )
RS Memory Function
S1 S2
K1
S3
S4
K2
K1
( )
Try This !
LAD I 0.0 Will the output Q 4.0 be activated when you activate:
I 0.1
Q 4.0
( )
I 0.2 I 0.3 Q 4.0
( )
I 0.4 I 0.5 Q 4.0
( )
The Answer
I 0.0 and I 0.1 = NO! I 0.2 and I 0.3 = NO! I 0.4 and I 0.5 = YES but why ?
( )
I 0.2 I 0.3 Q 4.0
the PLC registers in the PIQ that Q 4.0 is 1 the PLC registers in the PIQ that Q 4.0 is 0 the PLC registers in the PIQ that Q 4.0 is 0 so, Q 4.0 = 0
( )
I 0.4 I 0.5 Q 4.0
( )
( )
I 0.2 I 0.3 Q 4.0
the PLC registers in the PIQ that Q 4.0 is 0 the PLC registers in the PIQ that Q 4.0 is 1 the PLC registers in the PIQ that Q 4.0 is 0 so, Q 4.0 = 0
( )
I 0.4 I 0.5 Q 4.0
( )
( )
I 0.2 I 0.3 Q 4.0
the PLC registers in the PIQ that Q 4.0 is 0 the PLC registers in the PIQ that Q 4.0 is 0 the PLC registers in the PIQ that Q 4.0 is 1 this time, Q 4.0 = 1
( )
I 0.4 I 0.5 Q 4.0
( )
Using Memory...
I 0.0 I 0.2 I 0.4 M 100.0 M 100.1 M 100.2 I 0.1 I 0.3 I 0.5 M 100.0
( ) ( ) ( ) ( )
& >=1
Q 5.0
RLO
STAT
Parenthesized Function
Mathematics Multiplication Before Addition AND before OR 4 X 8 + 3 X 2 = 38 A I 0.0 A I 0.1 O A I 0.2 A I 0.3 = Q 4.0 RLO 1 1 1 0 0 1 STAT 1 1 \ 0 1 1 Logic Operation
Parenthesized Function
Mathematics Addition Before Multiplication OR before AND 4 X (8 + 3 ) X 2 = 88 A I 0.0 A( O I 0.1 O I 0.2 ) A I 0.3 = Q 4.1 RLO 1 1 1 1 1 1 1 STAT 1 \ 1 0 \ 1 1 Logic Operation
Topic 4
Numerical Systems and Data Formats
Hexadecimal Number
10 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7
0
Binary Number
2 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
4
10 10
16 256 0
16 16 0
1 1 1 1 1 1 1 1
1 1
16 1 0 1 2 3 4 5 6 7 8 9 A B C D E F 0 1
2 8 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0
2 4 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0
2 2 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0
2 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
IW0
Byte Addresses
High Byte
Low Byte
IB0
215 214 213 212 211 210 29
Bit Addresses
IB1
28 27 26 25 24 23 22 21 20
I0.7
I0.6
I0.5
I0.4
I0.3
I0.2
I0.1
I0.0
I1.7
I1.6
I1.5
I1.4
I1.3
I1.2
I1.1
I1.0
Load Operation
ACCUM 2 ACCUM 1
L L PII
IB 0 IB 1
Byte d
Byte c
Byte b
Byte a
IB 0 Byte b Byte a 0 IB 0 IB 1 0 IB 0 0 IB 1
Information from PII
Transfer Operation
ACCUM 2 ACCUM 1
T PIQ Byte a
QB 0
Byte d
Byte c
Byte b
Byte a
QB 0
Byte d
Byte c
Byte b
Byte a
Topic 5
Timer Operations
Return Operations
BE (Block End) the return operation is performed unconditionally it is always the last statement in the block BEU (Block End Unconditional) the return operation is performed unconditionally statements can follow BEU, but they will not be executed BEU is often used during commissioning so that individual parts of the program can be tested
BEC (Block End Conditional) the return is made dependent on a condition and is only performed if the condition is satisfied
FC3
is not executed
Topic 6
Counter Operations
Counter
Counter Operations
CU CD S CV R BI DE Q - count up - count down - set counter to the count value (CV) - the count value - reset the counter (count value = 0) - counter output as binary number - counter output as BCD number - counter status Q = 0 when count value = 0 Q = 1 when count value > 1
Timing Diagram
Counter Input
Counter Output
Comparator
Types of comparison: !=F ><F >F >=F <F <=F compare for equal to compare for not equal to compare for greater than compare for greater than or equal to compare for less than compare for less than or equal to
Comparison Operations
The comparison operations compare two digital values in accumulator 1 and accumulator 2 The result of comparison produces an RLO: Comparison satisfied Comparison not satisfied RLO = 1 RLO = 0
Comparator
THE END