PLC Programming - 1166196 - 2024 - 01 - 15 - 02 - 19
PLC Programming - 1166196 - 2024 - 01 - 15 - 02 - 19
X0 X1 Output
OFF OFF OFF
OFF ON OFF
ON OFF OFF
ON ON ON
X1
Input X1 . X2
X2 Output
AND Gate
OR Logic Gate
X0 X1 Output
OFF OFF OFF
OFF ON ON
ON OFF ON
ON ON ON
X1
Input X1 + X2
X2 Output
OR Gate
NOT Logic Gate
X0 X1 Output
OFF OFF OFF
OFF ON OFF
ON OFF ON
ON ON OFF
Input Output
NOT Gate
Exercise- 01
❖ Press X0 – Y0 ON
S/S C
X0 Y0
X0 Y0
X0 Y0 Programmable
X1 Logic Y1
Controller
❖ Press X0 – Y0 and Y1 ON X2 Y2
X3 Y3
X4 Y4
X0 Y0 Y1
X0 Y0 Y1
Exercise- 02
X0 X1 Y0
S/S C
X0 X1 Y0
X0 Y0
X0 X1 Y0
X1 Programmable Y1
Logic
❖ Press X0 – Y0 and Y1 ON, Press X1 – Y0 OFF X2 Controller Y2
X3 Y3
X4 Y4
X0 X1 Y0 Y1
X0 X1 Y0 Y1
X0 X1 Y0 Y1
Exercise- 03
X0 Y0
X1 Programmable Y1
Logic
X0 X1 Y0
X2 Controller Y2
X0 X1 Y0
X3 Y3
X0 X1 Y0
X4 Y4
Exercise- 04
Interlocking
❖ Press X0 – Y0 ON, Press X1 – Y1 ON +24V -0V
❖ Press X2 – Y0 and Y1 OFF
➢ If Y0 is ON Y1 should not be ON
➢ If Y1 is ON Y0 should not be ON
S/S C
X0 Y0
X1 Programmable Y1
Logic
X2 Controller Y2
X0 X1 X2 Y0 Y1
X3 Y3
X0 X1 X2 Y0 Y1
X4 Y4
X0 X1 X2 Y0 Y1
X0 X1 X2 Y0 Y1
Exercise- 05
S/S C
X0 Y0
X1 Programmable Y1
X0 X1 Y0 Logic
X2 Controller Y2
X0 X1 Y0
X3 Y3
X0 X1 Y0
X4 Y4
Exercise- 06
S/S C
X0 Y0
X1 Programmable Y1
X0 X1 Y0 Logic
X2 Controller Y2
X0 X1 Y0
X3 Y3
X0 X1 Y0
X4 Y4
Exercise- 07
S/S C
X0 Y0
X1 Programmable Y1
X0 X1 Y0 Logic
X2 Controller Y2
X0 X1 Y0
X3 Y3
X0 X1 Y0
X4 Y4
Exercise- 08
X1 Programmable Y1
Logic
X2 Controller Y2
X3 Y3
X0 X1 X2 Y0 Y1 X4 Y4
X0 X1 X2 Y0 Y1
X0 X1 X2 Y0 Y1
X0 X1 X2 Y0 Y1
Exercise- 09
X0 Y0
X1 Programmable Y1
Logic
X2 Controller Y2
X3 Y3
X0 X1 Y0
X4 Y4
X0 X1 Y0
X0 X1 Y0
X0 X1 Y0
X0 X1 Y0
Rising and Falling Edge Bits with Set/Reset
Use of Timer (TMR)
❑Retentive type timer (Non-Volatile)
➢ Timers which hold/latch the value during cut off power supply and count the value of time from hold
value to preset value during power supply.
USE OF
COUNTER
(CNT)
Compare block with timer <,>
➢ Press X0 – After 4 sec Y0 ON and after 8 sec Y1
➢ Press X0 – Y0 and Y1 ON after 4 sec Y0 OFF and after 8 sec Y1 OFF
➢ Press X0 – Y0 and Y1 ON after 6 sec Y1 OFF and after 5 sec Y0 OFF
➢ Press X0 – Y0, Y1 and Y2 ON after 8 sec Y0 OFF, after 10 sec Y1 OFF and after 12 sec Y2 OFF
Compare block with timer
➢ = Equal to
➢ > Greater then
➢ < Lesser then
➢ >= Greater then equal to
➢ <= Lesser then equal to
➢ Press X0 – Y0 Blink
➢ Press X0 after 4 sec Y0 ON and after 4 sec Y0 OFF
➢ Press X0 to blink Y0 (ON time 3 sec and OFF time 3 sec)
➢ Press XO to blink Y0 (ON time 2 sec and OFF time 2 sec)
➢ Press X0 – Y0 ON after 4 sec Y0 OFF and after 3 sec again ON
➢ Press X0 after 5 sec Y0 ON and Y1 ON and after 8 sec Y1 OFF
Compare block with counter
➢ = Equal to
➢ <> Not equal to
➢ > Greater then
➢ < Lesser then
➢ >= Greater then equal to
➢ <= Lesser then equal to
❖ Press X0, 2nd times – Y0 ON, Press 3rd time Y1 ON and Y0 OFF and Press 4th time Y2 ON and Y1 OFF
❖ Press X0 – Y0, Y1 and Y2 ON, Press X0 3rd time Y0 OFF, Press 4th time Y1 OFF and Press 5th time Y2 OFF
Compare block with timer and counter
1. Press X0 – Y0 ON after 4 sec 5. Press X0 – Y0 ON
Press again – Y1 ON after 4 sec again press Y0
Press again – Y2 ON after 4 sec
7. Press X0 + X1 + X3 – Y0 ON
2. Press X0 – Y0 ON after 4 sec Press X3 + X4 + X5 – Y1 ON
Y1 ON after 8 sec Press X4 + X5 + X6 – Y2 ON
Y2 ON after 12 sec Press X7 all OFF
X1 Programmable Y1
Logic
X2 Controller Y2
X3 Y3
X4 Y4
➢ Using INC/DEC
PLC Data Register
MOV, INC/DEC, RST, ADD, SUB, MUL & DIV
➢ Press X0 – Y0 ON for 2 sec and OFF for 2 sec (Blinking logic using MOV command)
▪ Press X1 – Y0 ON for 1.5 sec and OFF for 1.5 sec
▪ Press X2 – Y0 ON for 2 sec and OFF for 2.5 sec
➢ Code a blinking logic using Increment and Decrement (Maximum blinking time should be 2.5
sec and minimum blinking time should be 1.5 sec, default blinking time should be 2 sec)