Download presentation
Presentation is loading. Please wait.
1
Industrial Electronics
DAE 32003 Industrial Electronics
2
PROGRAMMABLE LOGIC CONTROLLER
Chapter 4 PROGRAMMABLE LOGIC CONTROLLER (PLC)
3
What is Programmable Logic Controller?
A Programmable Logic Controller is a microprocessor based system which uses a programmable memory for implementing specific functions such as logic, sequencing, timing, counting and arithmetic to control various types of machines or processes through analog or digital input / output modules.
4
PLC applications
5
Basic PLC components 1. Processor 2. Memory unit 3. Power supply
4. I/O module 5. Programming device
6
Basic PLC components
7
Typical PLC cabinet at site
8
PLC operations A PLC monitors inputs, makes decisions based on its program, and controls outputs to automate a process or machine. The operation of the PLC system is simple and straightforward. The processor or CPU completes three processes: (1) Scans, or reads from the input devices, (2) Executes or "solves" the program logic & (3) Updates or writes to the output devices. SCAN TIME The scan time is a continuous and sequential process of reading the status of inputs, evaluating the control logic and updating the outputs. Scan time varies from 1msec to 30msec.
9
SCAN TIME The scan time is a continuous and sequential process of reading the status of inputs, evaluating the control logic and updating the outputs. Scan time varies from 1msec to 30msec.
10
PLC advantages PLCs are similar to computer but have certain features which are specific to their use as controller. These are: They are rugged and designed to withstand vibrations, temperature, humidity, and noise. The interfacing for inputs and outputs is inside the controller. Easily programmed and easily understood programming language.
11
Mnemonic code
12
Mnemonic code
13
Mnemonic code examples
14
Mnemonic code examples
15
Mnemonic code examples
16
Convert the ladder diagram to mnemonic code
Activity Convert the ladder diagram to mnemonic code Answer
17
Convert the ladder diagram to mnemonic code
Activity Convert the ladder diagram to mnemonic code Answer
18
Convert the ladder diagram to mnemonic code
Activity Convert the ladder diagram to mnemonic code
19
Hardware configuration of PLC
20
Hardware configuration of PLC
Lab training set
21
Programming software:
Methods to upload programs to PLC OMRON CQM1H Programming console Programming software: CX programmer
22
OMRON CQM1H MEMORY MAP / ADDRESS Lab training set
23
Ladder diagram structure
PLC instructions Timer Counter Move Compare Add & Sub Keep Difu & Difd Ladder diagram structure
24
PLC instruction: TIMER
Timer / Counter address is from TIM TIM Require a TIM number and a set value (SV). For Omron CQM1H, SV must be between #0000 and #9999. Value of parameter SV is multiplied by 0.1s, the result being total time in seconds.
25
PLC instruction: TIMER
Timer / Counter address is from TIM
26
PLC instruction: TIMER
Timer / Counter address is from TIM Mnemonic code
27
PLC instruction: COUNTER
Timer / Counter address is from TIM CNT Require a CNT number and a set value (SV).
28
PLC instruction: COUNTER
Timer / Counter address is from TIM CNTR(12) Require a CNT number and a set value (SV). Can count up, down and reset function. CNTR is a reversible counter where both up count and down count can be down by the same counter
29
PLC instruction: COUNTER
Timer / Counter address is from TIM CP CNT 007 #10 00004 00002 10010 (siren) END Mnemonic code LD LD CNT #10 LD CNT OUT
30
Activity – Timer & Counter
An incoming bar for a parking lot will raise up for 20 seconds when sensor 1 detects an incoming car. After passing the bar, sensor 2 will start count up the number of cars that parks in the parking lot. At the exit sensor 3 will deduct out going cars from the parking lots. If at one time the number of cars in the parking lot is 20 then the full sign light will be on. Sensor 2 Sensor 1 Sensor 3 Incoming Outgoing
31
Activity – Timer & Counter
33
MOV(21) PLC instruction: MOVE
To move a data from one channel to another channel. S : Source Channel IR,SR,AR,DM,HR,TC,LR,# D : Destination channel IR,AR,DM,HR,LR
34
Transfer data from channel 000 to 100
P_On MOV (21) 000 100 Transfer data from channel 000 to 100 Source input Channel 000 Destination Output Ch 100
36
Example Display Error Code of Machine To Aid Tracing Source Of Problem. Using MOV(21) instruction design : Activation of error input signal to will sound an alarm and at the same time display the error code. Input will reset the error code displayed after machine recovery from error.
37
00001 00002 00003 RED LIGHT 10000 Alarm Alarm Code #1 MOV(21) #0001 101 #0002 #0003 #0000 00006 END Alarm Code #2 Alarm Code #3 Reset Alarm Code Display
38
PLC instruction: COMPARE
CMP(20) Compare is used to compare the data in a specific channel with the data in another channel or a four-digit hexadecimal constant. Cp1: First Compare Word IR,SR,AR,DM,HR,TC,LR,# Cp 2: Second Compare Word IR, AR, DM, HR, LR CMP(20) Cp1 Cp2
40
Example ADDR OP CODE DATA 0000 LD 25313 0001 OUT TR0 0002 CMP (20)
#0020 HR1 0003 AND 25507 0004 10001 0005 TR 0 0006 25506 0007 10002 25507 ( < ) TR0 CMP(20) #0020 HR1 25506 ( = ) 10001 10002 Green Light Red Light
41
ADD(30) PLC instruction: ADD To add data in two different channel.
Au Ad R Au: Augend Channel IR,SR,AR,DM,HR,TC,LR,# Ad: Addend Channel R: Result IR,AR,DM,HR,LR
42
Example 1. The operation: HR000 #0001 #1234 HR000 #1235
ADD(30) HR000 #1234 00007 ADDR OP CODE DATA 0000 LD 00007 0001 ADD(30) 0002 HR000 #1234 0003 END(01) 1. The operation: HR000 #0001 #1234 HR000 #1235 2. Add # # = #1235 3. The result: HR000 #1235
43
PLC instruction: SUBTRACT
To subtract data in two different channel. SUB(31) Mi Su R Mi: Minuend Channel IR,SR,AR,DM,HR,TC,LR,# Su: Subtrahend Channel R: Result IR,AR,DM,HR,LR
44
Example 1. The operation: HR000 #3234 #1234 HR000 #2000
SUB(31) HR000 #1234 00007 ADDR OP CODE DATA 0000 LD 00007 0001 SUB(31) 0002 HR000 #1234 0003 END(01) 1. The operation: HR000 #3234 #1234 HR000 #2000 2. Sub # # = #2000 3. The result: HR000 #2000
45
KEEP(11) PLC instruction: KEEP To replace normal latching.
Has two input, set and reset. Better use HR so the output retain even though power fails. Set =00000 Reset=00001 KEEP (11) IR/Output Port/HR END
46
PLC instruction: DIFFERENTIATE UP
DIFU(13) DIFU turns its output ON when it detects an OFF to ON transition in its input signal.
47
PLC instruction: DIFFERENTIATE DOWN
DIFD(14) DIFD turns its output ON when it detects an ON to OFF transition in its input signal or from HIGH to LOW signal .
48
Exercise 1 Replace CNT with ADD and SUB.
A simple car park control system allows only a maximum of 30 cars parking spaces. Every time a car comes in, an incoming sensor will add 1 and any car that goes out an outgoing sensor will deduct 1. If the car park is occupied with 30 cars at one time, a full sign will be lighted up to inform there is no vacancy.
49
Answer
50
Exercise 2 Use KEEP instruction to solve these problems instead of normal latching. A sensor is placed outside yellow line that enclosed the robot to provide safety cautions to the user. If the sensor detects someone crossing the yellow line the robot will automatically stop its operation and the siren will on until a reset button is pressed. Then the push button need to be pressed for robot to run again. YELOW LINE ROBOT sensor
51
Answer
52
Exercise 3 Use DIFU and DIFD to solve the problem.
An automatic home garage is equipped with sensor 1, S1, that detects the approaching car and will open the garage until sensor 2, S2,detects the whole car body has safely parks inside the garage. S1 S2 Garage Door
53
Answer
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.