Tutorial PLC Programming
Tutorial PLC Programming
SW07 SW08
00007 00008
END
SW08
00008
END
c.
00003 10001
00002 10002
00001 10003
END
d.
00001 00002 00003 10001
10000
00004
00005
END
e.
00000 00004
00005 00006
END
f.
00000 00001 00002 00003 10000
10000
00004 00005
END
g.
00000 00001
TIM 000
#0080
TIM 000 10000
END
h.
00000 00001
TIM 001
#0050
TIM 001 TIM 002 10003
10003
10003 00000
TIM 002
#0080
END
B. Convert the Mnemonics code given below to its equivalent ladder diagram:
a.
b.
ADDRESS INSTRUCTION DATA
00000 LD 00003
00001 OR 00002
00002 LD 00001
00003 OR 00000
00004 AND LD -
00005 LD 00004
00006 OR 00005
00007 AND LD -
00008 OUT 10001
00009 FUN (01) -
c.
A. ON-DELAY
i.
PB 1
00001
T0
TIM000
#0050
T0 L1
TIM000 10001
L
END
ii.
PB 1 Rst
00001 00001
TIM000
#0100
T0 L2
TIM000 10002
L
T0 L3
TIM000 10003
L
END
B. OFF-DELAY
i.
PB 1 L1
T0
00001 10001
TIM000
L
L1
10001
L1 T0
10001 TIM000
#0200
END
ii.
PB 1
00001
TIM000
#0080
L1 T0 L1
10001 TIM000 10001
L
END
C. TURN ON-OFF DELAY
i.
PB 1 T0
00001
TIM000
#0050
T0 Bz1
TIM000 TIM001 10001
BZ
L1
10001
T1
Bz1
00001
10001 TIM000
#0050
END
i.
PB 1
00001 TIM000
CNT001
RST #0010
00002
C1 L1
CNT001 10001
L
END
ii.
T0
PB1
00000 TIM000
#0050
T0 T1 L0
TIM000 TIM001 10000
L0 T1
10000 TIM001
#0030
END
iii.
PB1
00000 T0
T0 CNT 000
TIM000 #0005
C1 L0
CNT 000 10000
T1 L
L0
10000 TIM001
#0050
L1
T1
10001
TIM 001
L
END
TUTORIAL 3: LOGIC APPLICATION.
a. Door Bell.
Door push button PBI being pressed, the bell will rang.
b. Water Tank Level.
When start push button being pressed, and the water levels is lower than sensor S0, solenoid
valve, SV1 will on enable water to flow into the tank. At the same time motor M1 will ON.
When the water level higher then sensor S1, solenoid valve, will on and SV1 will OFF. This
enable the water to flow out of the tank. If stop push button being pressed. All the operation
will stop. Used internal relay R0 to R62F for holding purposes.
c. Two Way Switch.
A lamp near a stair-case at the ground floor is control by a two way switch. Switch S0 at the
ground floor and switch S1 at the first floor. The lamp will ON only if either one of the switch
is ON.
d. Holding Circuit for a Conveyor Motor.
An AC motor starter using ‘direct On Line’ technique is control by PLC. When start push button
being pressed. The motor will stop. Used internal relay R0 to R62F for holding purpose.
e. Simple House Security system.
All four parameter of a house is install with sensors. S0, S1, S2 and S3. When one of the sensor
ON a buzzer will rung. A stop push button is used to stop the buzzer. Use internal relay R0 to
R62F for holding purposes.
f. Pop Quiz.
Each of the participants have one push button. PBA, PBB and PBC. It’s also have one lamp. LA,
LB, and LC. The lamp will on and a buzzer will rung one of the button being pressed first. This
will prevent the other lamp to ON even the push button being pressed. A reset push button is
used to reset the lamp.
g. Code Switch.
The lock plunger will open when all the sensor (S0, S1, S2, S3 and S4) is ON. A reset push
button is used to close the lock plunger. Used internal relay R0 to R62F for holding purposes.
h. Bottle Detector.
A sensor is used to detect the label of the bottle. A cylinder is used as the reject ram to reject
the bottle that being detected without label. A “reed switch’ at the end of cylinder is used to
reset the cylinder.
i. Stop Barrier
Sensor S1 is used to detect incoming car into a parking area. This will OFF the green lamp and
ON the red lamp. Another sensor S2 is used to detect that parking being take form the parking
booth, and this will open the barrier. Sensor S3 at the end of the booth will reset the barrier.
j. Sequence Running Light.
If push button PBA is being pressed, lamp 1 will ON, and then if push button PBB being pressed,
lamp 2 will ON. Push button PBC being pressed, lamp 1 will ON. Push button PBD is used to
reset the lamp. Use internal relay for holding purposes.
k. Forward-Reverse Motor.
If push button PBA being pressed. A box on the conveyer will move forward will ON until it hit
limit switch LS1. Then if push button PBB being pressed, the box will move backward will ON
until hit limit switch LS1. Use auxiliary relay 01600 to 09500 for holding purpose. If necessary.
TUTORIAL 4: TIMER APPLICATION.
a) When input push button X0 being pressed 5 times, then output Y0 will ON. Use input X1 as
the reset button for the counter.
b) When input push button X0 being pressed times, then output Y0 will ON, and then when input
push button X0 being pressed 3 times the output Y0 will OFF. Use input X1 as the reset button
for the counter.
c) When input push button X0 being pressed 5 times, then output Y0 will ON, and then when
input push button X0 being pressed another 3 times output Y0 will OFF. Use input X1 as the
reset button for the counter.
d) When input push button X0 being pressed 2 times, then output Y0 will ON. Then when input
push button X0 being pressed another 3 times, output Y1 will ON. Lastly, when input push
button X0 being pressed another 3 times, output Y2 will ON. Use input X1 as the reset button
for the counter.
e) When input push button X0 being pressed 2 times, then output Y0 will ON. When input push
button X2 being pressed 2 times, output Y1 will ON. Lastly, when input push button X3 being
pressed 2 times, all output Y0, Y1 and Y2 will OFF.
f) By using special auxiliary relay input 910C, when program is switch to RUN mode, 1 second Y0
ON, 2 second Y1 ON, 3 second Y2 ON and 4 second it will RESET all the output Y0, Y1, and Y2
and this process will be repeated.
g) When input push button X0 being pressed 2 times, then output Y0 will ON. When input push
button X2 being pressed 2 times, output Y1 will ON, when input push button X0 being pressed
another 2 times, output Y1 will ON. Then when input push button X0 being pressed another 2
times, output Y2 will ON. Then when input push button X0 being pressed another 1 times,
output Y0 will OFF.
h) Repeat exercise (f) by using special auxiliary relay input 901A.
i) When input push button X0 being pressed 1 time, output Y0 will ON, another 1 time output
Y1 will ON and output Y1 will OFF. This process will continue. Use input X1 as the reset button
for the counter.
j) When input push button X0 being pressed once, output Y0 will ON, 2 second later output Y1
will ON and output Y0 will OFF, 2 second later output Y2 will ON and output Y1 will OFF, 2
second later output Y0 will ON again and output Y2 will OFF. This process will continues, after
5 times repeated the process will automatically stop.
k) By using combination between timer and counter, design a circuit how to count until 3600
times. Use input 901C as input clock.
l) Basic Product Counter.
When start push button PB0 being pressed, box conveyor will move Y0 ON. When sensor S1
detect the box, box conveyor will OFF and product conveyor will ON. Product will fall in the
box. When sensor S2 sense 100 product pass through the product conveyor and it will stop
and box conveyor will ON. The process will be repeated until PB3 being pressed to stop the
operation.
m) Basic Sequence Process.
When start push button PB0 being pressed, solenoid valve will ON that will make cylinder 0
will ON, 2 second after that solenoid valve SV1 will ON that will make cylinder 1 will ON. 2
second after that solenoid valve SV2 will ON that will make cylinder 2 will ON. This process
will repeat for 5 times.
n) Packaging Machine.
When start push button PB0 being pressed, conveyor Y0 will ON. Sensor S1 will sense the
product. When S1 count 5 product, conveyor will stop and SV2 will ON for 2 second to pack
the product. Then the timer and counter will be reset. The process will be repeated until PB2
being pressed to stop the operation.
TUTORIAL 6: SEQUENCE APPLICATION.
c. Gate Control.
If forward push button PB0 being pressed, motor M0move forward until it hit limit switch LS1.
Then if backward push button PB2 being pressed. Motor M1 move backward until it hit limit
switch LS3. Push button PB4 is used to the stop the motor.
e. Safety switch.
When switch S1 ON the lamp L0 will only ON if safety switch SS0 ON. Otherwise the lamp L0
will OFF. Switch S2 is used to switch OFF the safety switch SS0. When switch S4 on the lamp
L1 will only ON if safety switch SS3 ON, otherwise the lamp L1 will OFF. Switch S5 is used to
switch OFF the safety switch SS3.