Академический Документы
Профессиональный Документы
Культура Документы
2011 snaim
Course Outcomes
By the end of semester, students should be ab e able to: CO1 Describe the basic principle of PLC and its function. CO2 Implement PLC Hardware configuration. CO3 Identify PLC system wiring and component. CO4 E Execute and practice PLC P d i Programming i for specific tasks. CO5 Practice right attitude and safety procedure.
Universiti Malaysia Pahang
2011 snaim
SNAIM(c)2011
17/10/2011
Mark distribution
Quizzes Lab Report Assessment 1 Assessment 2 Test Total 5% 10% 25% 30% 30% 100%
References
1 Jon Stenerson Industrial Automation and Process Control,Upper Saddle River, NJ: Prentice Hall,2003 John R Hackworth & Frederick D Hackworth,Jr Programmable Logic Controller:Programming Method and Application,Upper Saddle River,NJ:Prentice Hall,2004 OMRON Sysmac CQM1H Series Operation Manual,Revised August 2005
Frank D. Petruzella, P F kDP t ll Programmable L i C t ll 3 d Editi M bl Logic Controllers, 3rd Edition, McGraw Hill, 2005. Omron, Programming Manual, Revised December 2003, Omron Corporation, 2003.
SNAIM(c)2011
17/10/2011
1.0 INTRODUCTION
2011 snaim
2011 snaim
SNAIM(c)2011
17/10/2011
Output Actuator
Binary Motor Relay Cylinder Continuous Control Valve
2011 snaim
2011 snaim
SNAIM(c)2011
17/10/2011
2011 snaim
2011 snaim
SNAIM(c)2011
17/10/2011
2011 snaim
2011 snaim
SNAIM(c)2011
17/10/2011
2011 snaim
2011 snaim
SNAIM(c)2011
17/10/2011
2011 snaim
WIRED LOGIC
Specific Purpose Small and Medium Difficult Several Days Difficult Depends on design and manufacture Advantage on small scale operation
PLC
General Purpose Medium and large Easy Almost immediate Easy Very High Advantage on small medium and large scale operation
SNAIM(c)2011
17/10/2011
FUNCTIONS
Conventional Relay Control Logic Replacer /P.C.B Card Controller Replacer p Timers/Counters Auto/Semi-auto/Manual Control of machine and Processes Arithmetic Operation Information handling Analog Control (Temperature, Pressure) P.I.D (Proportional-Integral-Derivation) P I D (Proportional Integral Derivation) Servo Motor and Stepper Motor Process Monitoring and Alarm Fault Diagnostic and Monitoring Interfacing with Computer -Printer/ASCII Factory Automation Local Area Network / Wide Area Network
Supervisory Control
SNAIM(c)2011
17/10/2011
PLCs manufacturer
OMRON Allen Bradley Schneider (Modicon, Telemecanique, Square D) GE Fanuc Siemens Automation Direct (Koyo) Toshiba Mitsubishi Hitachi Keyence Honeywell Yokogawa Festo Emerson Eberle Texas Instruments
PLC operation
First the PLC takes a look at each input to determine if it is on or off. In other words, is the sensor connected to the first input on? How about the second input? How about the third... It records this data into its memory to be us
2. EXECUTE PROGRAM
Next the PLC executes your program one instruction at a time. Maybe your program said that if the first input was on then it should turn on the first output output. Since it already knows which inputs are on/off from the previous step it will be able to decide whether the first output should be turned on based on the state of the first input. It will store the execution results for use later during the next step.
SNAIM(c)2011
10
17/10/2011
PLC operation
3. UPDATE OUTPUT STATUS
Finally the PLC updates the status of the outputs. It updates the outputs based on which inputs were on during the first step and the results of executing your program during the second step. Based on the example in step 2 it would now turn on the first output because the first input was on and your program said to turn on the first output when this condition is true.
Execute Program
SNAIM(c)2011
11
17/10/2011
PLC Configuration
Rack
Mini
PLC Configuration
The configuration of PLC refers to the packaging of the components. Typical configurations are listed below from largest to smallest.
Rack Type : A rack can often be as large as 18 by 30 by 10 Mini: These are similar in function to PLC racks, but about the half size. Dedicated Backplanes can be used to support the cards OR DIN rail mountable with incorporated I/O bus in module. Shoebox: A compact, all-in-one unit that has limited expansion biliti Lower cost and compactness make these ideal for small t d t k th id l f ll capabilities. L applications. DIN rail mountable. Micro: These units can be as small as a deck of cards. They tend to have fixed quantities of I/O and limited abilities, but costs will be lowest. DIN rail mountable.
SNAIM(c)2011
12
17/10/2011
Sizing of PLC
Micro PLC: I/O up to 32 points Small PLC: I/O up to 128 points Medium PLC: I/O up to 1024 points Large PLC: I/O up to 4096 points Very Large: I/O up to 8192 points
SNAIM(c)2011
13
17/10/2011
CPU Module
The Central Processing Unit (CPU) Module is the brain of the PLC. Primary role to read inputs, execute the control program, update outputs. The CPU consists of the arithmetic logic unit (ALU), timing/control circuitry, accumulator, scratch pad memory, program counter, address stack and instruction register. A PLC works by continually scanning a program
Self Check Scan Inputs
Update Outputs O t t
Execute Code C d
Memory
The memory includes pre-programmed ROM memory containing the PLCs operating system, driver programs and application programs and the RAM memory. PLC manufacturer offer various types of retentive memory to save user-programs and data while power is removed, so that the PLC can resume execution of the user-written control program as soon as power is restored restored.
SNAIM(c)2011
14
17/10/2011
Memory contd
Many PLCs also offer removable memory modules, which are plugged into the CPU module. Memory can be classified into two basic categories: volatile and non-volatile. - Volatile memory is that which loses state (the stored information) when power is removed. - Nonvolatile memory, on the other hand, maintains the information in memory even if the power is interrupted.
Memory contd
Some types of memory used in a PLC include:
ROM (Read-Only Memory) RAM (Random Access Memory) PROM (Programmable Read-Only Memory) EPROM (Erasable Programmable Read-Only Memory) EEPROM (Electronically Erasable Programmable ReadOnly Memory) FLASH Memory Compact Flash Can store complete program information, read & write text files
SNAIM(c)2011
15
17/10/2011
I/O Modules
Input and output (I/O) modules connect the PLC to sensors and actuators. Provide isolation for the low-voltage, low-current signals that the PLC uses internally from the higherpower electrical circuits required by most sensors and actuators. d Wide range of I/O modules available including: digital (logical) I/O modules and analog (continuous) I/O modules.
Inputs Modules
Inputs come from sensors that translate physical or chemical phenomena into electrical signals. The simplest form of inputs are digital/discrete in AC/DC. In smaller PLCs the inputs are normally built in and are specified when purchasing the PLC. For l F larger PLCs the inputs are purchased as modules, or PLC h i h d d l cards, with 8,16, 32, 64, 96 inputs of the same type on each card.
SNAIM(c)2011
16
17/10/2011
Inputs Modules
The list below shows typical ranges for input voltages voltages.
5 Vdc
12 Vdc 24 Vdc 48 Vdc 12 Vac 24 Vac 120 Vac 240 Vac
Outputs Modules
Output modules rarely supply any power, but instead act as switches. External power supplies are connected to the output card and the card will switch the power on or off for each output. A common choice when purchasing output cards is relays, transistors or triacs. Relay are the most flexible output devices. They are capable of switching both AC and DC outputs. But, they are slower, cost more, and they will wear out after millions of cycles.
SNAIM(c)2011
17
17/10/2011
Relays
The most important consideration when selecting g relays, or relay outputs on a PLC, is the rated current and voltage. For transistor outputs or higher density output cards relay terminal blocks are available.
Advantage of individual standard replaceable relays
Output Modules
Typical output voltages are listed below below.
5 Vdc
12 Vdc 24 Vdc 48 Vdc 24 Vac 120 Vac 240 Vac
SNAIM(c)2011
18
17/10/2011
Analogue Inputs/Outputs
Analogue input cards convert continuous signals via a A/D converter into discrete values for the PLC Analogue output cards convert digital values in then PLC to continuous signals via a D/A converter. Resolution can be important in choosing an applicable card Example, for a temperature input of 0 to 100 degrees C
For 8 bit resolution the value in the PLC is 0 to 255 For 12 bit resolution the value in the PLC is 0 to 4095 For 12.5 bit resolution the value in the PLC is 0 to 6000 For 13 bit resolution the value in the PLC is 0 to 8192 For 16 bit resolution the value in the PLC is 0 to 32768
Analogue Cards
Typical Analogue Input signals are:
Flow sensors Humidity sensors Load Cells Potentiometers Pressure sensors Temperature sensors Vibration
SNAIM(c)2011
19
17/10/2011
Special Modules
RF ID Voice Gas Flow C l l i G Fl Calculation Weigh Cell Hydraulic Servo ASCII Fuzzy Logic Temperature Sensor Temperature Control p Heat/Cool Control Field Bus Cards
DeviceNet, Profibus etc Lonworks, BACNet
Fast Response (Interrupt) PID Loop C L Controller ll BASIC Cards RS232 Comms Modbus ASCII/RTU Ethernet Comms High Speed Counters Position Control Cards Per to Per Comms
Controller Link DH+ Modbus Plus
Networks
ASI Devicenet Interbus-S Profibus Interbus Fieldbus Ethernet I/P Smart Distributed System (SDS) Seriplex CANopen Lonworks BACNet
SNAIM(c)2011
20
17/10/2011
2011 snaim
CQM1H CPU51
Power Supply pp y Unit CPU unit Input p Module Output module
PA206
CQM1H-CPU51
0 CH
OC 221
SNAIM(c)2011
21
17/10/2011
Configuration
2011 snaim
Configuration
I/O point capacity : 512 points. CPU Block
Dedicated I/Os module up to 11 units connectable.
2011 snaim
SNAIM(c)2011
22
17/10/2011
Configuration
CPU and Expansion I/O Block
CPU: Up to 5 units (exclude I/O Control unit) Expansion: Up to 11 units (exclude I/O Interface Unit)
2011 snaim
Power Consumption
Important to select suitable power supply module. module Requirement to power up each module that attached.
2011 snaim
SNAIM(c)2011
23
17/10/2011
Power Consumption
2011 snaim
2011 snaim
SNAIM(c)2011
24
17/10/2011
2011 snaim
2011 snaim
SNAIM(c)2011
25
17/10/2011
X2: 11
X2: 12
X2: 13
X2: 14
X2: 15
X2: 16
X2: 17
X2: 18
K6.5
/6.6
NAME VERIFY BY A Rev 1 Decription 2 Date CHECK BY DRAW BY 3 <Name> <Name> SNAIM
Title
Drawing Number
Sheet
Input Card
<Drawing No>
File Name ELECTRICAL_DRAWING_MCC2. vsd Rev.
2
A
<Rev.>
10
2011 snaim
2011 snaim
SNAIM(c)2011
26
17/10/2011
2011 snaim
Point assignment
Rack: 01F Channel: . Card: Digital Input - OCH
Point No. 00 01 02 03 04
Lebel/mark 0000
SNAIM(c)2011
27
17/10/2011
Address Assignment
Input p 0000
Input slot/channel no Input point no.
snaim 2008
Address Assignment
Output p 10000
Input slot/channel no Input point no.
snaim 2008
SNAIM(c)2011
28
17/10/2011
Address Assignment
For CQM1H, the address are dedicated by the system (cant setting by user) E.g.
Build in 0CH card is start from 00.00 Next second input card will start at 01.00
Universiti Malaysia Pahang
2011 snaim
CXCX-POGRAMMING
2011 snaim
SNAIM(c)2011
29
17/10/2011
Block Diagram
Ladder Diagram
Universiti Malaysia Pahang
2011 snaim
Basic Element of LD
2011 snaim
SNAIM(c)2011
30
17/10/2011
Anatomy of a LD
Typically flows from left to right. Divided into sections called rungs, Each i/os instruction is assigned an address indicating the location in the PLC memory where the state of that instruction is stored.
SNAIM(c)2011
31
17/10/2011
CXCX-Programmer
SNAIM(c)2011
32
17/10/2011
Main windows
Lader Logic
2011 snaim
SNAIM(c)2011
33
17/10/2011
Lader Logic
2011 snaim
AND Application
IN A 0 0 1 1 IN B 0 1 0 1 OUT
2011 snaim
SNAIM(c)2011
34
17/10/2011
GREEN LIGHT ON
2011 snaim
OR Application
IN A 0 0 1 1 IN B 0 1 0 1 OUT
2011 snaim
SNAIM(c)2011
35
17/10/2011
OR Application
IN A 0 0 1 1
IN B 0 1 0 1
OUT
snaim 2008
2011 snaim
SNAIM(c)2011
36
17/10/2011
2011 snaim
KEEP Instruction
Purpose:
Defines a bit (B) as a latch, controlled by the set (S) and reset ( ) inputs. ( ) (R) p
SNAIM(c)2011
37
17/10/2011
Flow chart
start
Green Light On Ladder Diagram Push Stop Button Green Light OFF
End
Turns ON B for an ON execution condition; does not affect B for an OFF execution condition. Operand Data Areas: B: Bit IO, AR, HR, LR.
Turns OFF B for an ON execution condition; does not affect B for an OFF execution condition. Operand Data Areas: B: Bit IO, AR, HR, LR
SNAIM(c)2011
38
17/10/2011
More Exercise.
Timer (TIM)
A timer is activated when its execution condition goes ON and is reset (to S) di i di ( when the execution condition goes OFF. Once activated, TIM measures in units of 0.1 second from the S.
N TC Number S Set value (word, BCD)
Universiti Malaysia Pahang
2011 snaim
SNAIM(c)2011
39
17/10/2011
Timer (TIM)
ON
ON
If the execution condition remains ON long enough for TIM to time down to zero, the Completion Flag for the TC number used will turn ON and will remain ON until TIM is reset (execution condition goes OFF).
Universiti Malaysia Pahang
2011 snaim
SNAIM(c)2011
40
17/10/2011
A Timer 5 Sec? Green Light ON Select Auto Mode Yellow & Green Light OFF End
No
FLICKER: EXERCISE 3
Start Push Start button No A Timer 1 Sec? Green Light OFF Push Stop
SNAIM(c)2011
41
17/10/2011
FLICKER: EXERCISE 4
Start Push Start button N Timer o 3 Sec? Yes Green Light ON A A N Timer o 1 Sec? Yes Green Light OFF Continuou s Blinking Push Stop System RESET End
TIMER APPLICATION
Lab sheet 2 : Exercise 5
Input Input Devices Assignment A i 0000 0001 0002 Start PB Stop PB Auto/Man Selector
Output Output Devices Assignment 10001 10002 10003 g Green Light Red Light Yellow Light
2011 snaim
SNAIM(c)2011
42
17/10/2011
Counter (CNT)
CNT is used to count down from SV when the execution condition on the count pulse -CP, goes CP, from OFF to ON. The present value (PV) will be decremented by one whenever CNT is executed with an ON execution condition for CP and the execution condition was OFF for the last execution
N CNT Number 000 - 511 IO, AR, DM, HR, #
2011 snaim
Counter (CNT)
ON
ON
The Completion Flag for a counter is turned ON when the PV reaches zero and will remain ON until the counter is reset. CNT is reset with a reset input, R. When R goes from OFF to ON, the PV is reset to SV.
Universiti Malaysia Pahang
2011 snaim
SNAIM(c)2011
43
17/10/2011
Please note that TIM number and CNT number should be unique (NOT SAME) in a same program.
E.g.
CNT000 then use TIM000 in same program.
2011 snaim
SNAIM(c)2011
44
17/10/2011
Yellow Light ON
Extra exercise
MAN MODE NG PART ON & RUN PART OFF
OK PART BLINKING STOP PB AUTO MODE NO RUN PART BLINKING & OK PART OFF IF STOP PB 5x
2011 snaim
SNAIM(c)2011
45
17/10/2011
DIFU & DIFD INC & DEC Shift Register Move & Compare p Interlocking
INTERMEDIATE PROGRAM
DIFU instruction
Differential UP (rise edge) DIFU (13) turns ON the designated bit (B) for one scan on reception of the leading (rising) edge of the input signal
Operand Data Areas B Bit IO, AR, HR, LR
2011 snaim
SNAIM(c)2011
46
17/10/2011
DIFD instruction
Differential Down (fall edge) DIFD(14) turns ON the designated bit (B) for one scan on reception of the trailing (falling) edge of the input signal.
Operand Data Areas B Bit IO, AR, HR, LR
2011 snaim
DIFU vs DIFD
2011 snaim
SNAIM(c)2011
47
17/10/2011
MOVE instruction
Copies the contents of S to D
2011 snaim
Cp1
1st
compare word
IO, AR, DM, HR, TC, LR, # IO, AR, DM, HR, TC, LR, #
2011 snaim
SNAIM(c)2011
48
17/10/2011
IO,AR,D M,HR,LR
2011 snaim
IO,AR,D M,HR,LR
2011 snaim
SNAIM(c)2011
49