Sunday, May 1, 2011

Lock Unlock Door Using Omron PLC




PLC Type CP1L, Name Input / Output PLC :

INPUT PLC :
I:0.00 ; Numeric 0 from KeyPad
I:0.01 ; Numeric 1 from KeyPad
I:0.02 ; Numeric 2 from KeyPad
I:0.03 ; Numeric 3 from KeyPad
I:0.04 ; Numeric 4 from KeyPad
I:0.05 ; Numeric 5 from KeyPad
I:0.06 ; Numeric 6 from KeyPad
I:0.07 ; Numeric 7 from KeyPad
I:0.08 ; Numeric 8 from KeyPad
I:0.09 ; Numeric 9 from KeyPad
I:0.10 ; ENTER Key from KeyPad
I:0.11 ; Door closure Sensor
I:0.12 ; Door Exit Button

OUTPUT PLC :
Q:100.00 ; Output to Relay Coil (Used for Electromagetic Lock and Green LED)


Download PDF File:
Lock Unlock Door Using Omron PLC(.pdf)


Reading Ladder PLC Programming for Lock Unlock Door using Omron PLC :

Step 1 :
Password Data using D20
a.If 11.00 = OFF (Always ON) Then D20 = 5214 (can be modified and 4 Digits Decimal)

Step 2 :
Numeric 0 to 9 is pressed
Using D0 for temporary data storage
a.If I:0.00 = ON (Numeric 0) Then DIFU(013) 10.00 = ON AND D0 = 0
b.If I:0.01 = ON (Numeric 1) Then DIFU(013) 10.00 = ON AND D0 = 1
c.If I:0.02 = ON (Numeric 2) Then DIFU(013) 10.00 = ON AND D0 = 2
d.If I:0.03 = ON (Numeric 3) Then DIFU(013) 10.00 = ON AND D0 = 3
e.If I:0.04 = ON (Numeric 4) Then DIFU(013) 10.00 = ON AND D0 = 4
f.If I:0.05 = ON (Numeric 5) Then DIFU(013) 10.00 = ON AND D0 = 5
g.If I:0.06 = ON (Numeric 6) Then DIFU(013) 10.00 = ON AND D0 = 6
h.If I:0.07 = ON (Numeric 7) Then DIFU(013) 10.00 = ON AND D0 = 7
i.If I:0.08 = ON (Numeric 8) Then DIFU(013) 10.00 = ON AND D0 = 8
j.If I:0.09 = ON (Numeric 9) Then DIFU(013) 10.00 = ON AND D0 = 9
Note : DIFU(013) = Single-scan of target relay ON at rising edge of previous state

Step 3 :
Count the number keypad is pressed
Using D30 for Count data storage
a.If 10.00 = ON Then ++(590) D30 (Increment target device value)

Step 4 :
Enter Released for Value D30 = 0 (Count data RESET)
a.If I:0.10 = ON (ENTER key is pressed) Then DIFD(014) 10.01 = ON (Single-scan of target relay ON at falling edge of previous state)
b.If 10.01 = ON Then Value D30 = 0

Step 5 :
Password from the KeyPad
Using D12 for Password from the KeyPad
a.Keypad is pressed first, multiplied by 1000
(10.00 = ON) -> (=(300) &1 D30) -> (*U(422) &1000 D0 D1)
b.Keypad is pressed second, multiplied by 100
(10.00 = ON) -> (=(300) &2 D30) -> (*U(422) &100 D0 D2)
c.Keypad is pressed three, multiplied by 10
(10.00 = ON) -> (=(300) &3 D30) -> (*U(422) &10 D0 D3)
d.Keypad is pressed four, multiplied by 1
(10.00 = ON) -> (=(300) &4 D30) -> (*U(422) &1 D0 D4)
e.Sum all the data
(10.00 = ON) -> (+(400) D1 D2 D10)
(10.00 = ON) -> (+(400) D10 D3 D11)
(10.00 = ON) -> (+(400) D11 D4 D12)

Example :
Keypad is pressed :
first : Numeric 5 pressed -> 5 multiplied by 1000 = 5000
second : Numeric 2 pressed -> 2 multiplied by 100 = 200
three : Numeric 1 pressed -> 1 multiplied by 10 = 10
four : Numeric 4 pressed -> 4 multiplied by 1 = 4
Sum all the data : 5000 + 200 + 10 + 4 = 5214
So,Password from the keypad is 5214

Step 6 :
Check the number of digits
a.If D30 = 4 (4 times the keypad is pressed) Then 10.02 = ON

Step 7 :
Correct Password And UnLock Door
7.1. Correct Password
a.If I:0.10 = ON (ENTER key is pressed) Then DIFU(013) 10.04 = ON (ENTER Down)
b.If 10.04 = ON (ENTER Down) AND 10.02 = ON AND Value(D12 = D20) Then SET 10.03 = ON
7.2. UnLock Door by Correct Password
c.If 10.03 = ON AND 10.07 = OFF AND T0000 = OFF Then 10.06 = ON (Hold UnLock)
7.3. UnLock Door by Door Exit Button
d.If I:0.12 = ON (Door Exit Button) AND 10.07 = OFF AND T0000 = OFF Then 10.06 = ON (Hold UnLock)
7.3. UnLock Door
e.If 10.06 = ON Then Q:100.00 = ON (UnLock Door)

Step 8 :
Lock Door by Door position
a.If I:0.11 = ON (Door Closure Sensor) Then DIFU(013) 10.07 = ON
b.If 10.07 = ON Then 10.06 = OFF
c.If 10.06 = OFF Then Q:100.00 = OFF (Lock Door)

Step 9 :
Lock Door by Timer
a.If Q:100.00 = ON AND I:0.11 = ON (Door Closure Sensor) Then Activate the Timer TIM0000
b.If T0000 = ON Then 10.06 = OFF
c.If 10.06 = OFF Then Q:100.00 = OFF (Lock Door)

Step 10 :
a.If 10.00 = ON AND 10.03 = ON (Correct Password) Then RSET 10.03 (10.03 = OFF)
b.If 10.07 = ON AND 10.03 = ON (Correct Password) Then RSET 10.03 (10.03 = OFF)
c.If T0000 = ON AND 10.03 = ON (Correct Password) Then RSET 10.03 (10.03 = OFF)

Please Download Programming for CX-Programmer version 9.1 :
Lock Unlock Door Using Omron PLC

See : Lock Unlock Door


Labels:


Newer Post Older Post Home

You may also like these ebook:

Get Free PLC eBook directly sent to your email,
and email subscription to program-plc.blogspot.com




We hate SPAM. Your information is never sold or shared with anyone.

Your Email Will Be 100% Secured !

Your email is stored safely on Google FeedBurner