0% found this document useful (0 votes)
11 views

Tutorial PLC Programming

Uploaded by

sila03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Tutorial PLC Programming

Uploaded by

sila03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

TUTORIAL 1: LADDER DIAGRAM & MNEMONIC

A. Write the Mnemonic codes for the following ladder diagram:

SW00 SW01 SW02 SW003 SW04 SW05


a. LAMP
(00000) 00001 00002 00003 00004 00005
10000
SW06
01000 01001 00006

SW07 SW08
00007 00008

END

SW00 SW01 SW 02 SW003 SW04 LAMP


b. (00000) 00001 (00002) 00003 00004
10000
SW07
SW05 SW06 00007
00005 00006

SW08
00008

END

c.
00003 10001

00002 10002

00001 10003

END

d.
00001 00002 00003 10001

10000

00004

00005

END
e.

00001 00002 00003 10001

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.

ADDRESS INSTRUCTION DATA


00000 LD 00003
00001 AND 00002
00002 AND 00001
00003 LD 00000
00004 AND 00004
00005 OR LD -
00006 LD 00005
00007 AND 00006
00008 OR LD -
00009 OUT 10000
00010 FUN(01) -

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.

ADDRESS INSTRUCTION DATA


00000 LD 00003
00001 AND 00002
00002 LD 00006
00003 AND 00007
00004 OR LD -
00005 AND 00001
00006 AND NOT 00000
00007 AND 00004
00008 AND 00005
00009 OUT 10001
00010 FUN(01) -

ADDRESS INSTRUCTION DATA


d. 00000 LD 00003
00001 AND 00002
00002 LD 00006
00003 AND 00007
00004 OR LD -
00005 OR 00008
00006 AND 00001
00007 AND NOT 00000
00008 LD 00004
00009 AND 00005
00010 OR 00009
00011 AND LD -
00012 OUT 10000
00013 FUN(01) -
TUTORIAL 2: TIMER & COUNTER
LADDER DIAGRAM MNEMONIC CODE

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

D. APPLICATIONS OF TIMER & COUNTER

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. Front House Lighting.


If the sensor S0 in front of the house is ON, the security or spot light will ON for 15 second.
Then if the sensor S0 and sensor S1 is ON, the security light or spot light and alarm will ON
continuously until stop push button PB2 being pressed to reset the system.
b. Low Pressure Indicator.
If the sensor S0 in the airline is ON that shows that the pressure is low, the buzzer and pilot
lamp will ON for 10 second then OFF for 10 second and then ON for 10 second again. This
process will goes on until stop push button PB1 being pressed to reset the system.
c. Basic House Automation.
When the owner of the house came back home and open the front door, limit switch LS0 will
ON. This will switch OFF the security system SS1, the lamp will ON and 5 second after that the
air – condition will ON. When the owner open the door to go out LS0 will OFF. This will switch
ON the security system and 5 second after that the lamp and the air – condition will
automatically OFF.
d. Parking ticket barrier.
When a car approaches the ticket barrier and the green lamp is ON. Red light is OFF and the
barrier is OFF. Then the driver will pressed the ticket push button PB0 and the green lamp is
OFF, red light is ON the barriers OFF the barrier will ON and allow the car in the car to entry
the parking area. Then 10 second after sensor ON that sense the car in the car park the barrier
will OFF where it will return to horizontal position and the green lamp is ON, red light is OFF
waiting the next car.
e. Simple Marking Machine.
When sensor S0 sense a product, the solenoid valve SV0 will ON for 1 second that will enable
the cylinder to go down and do the marking process of the product. Alarm A0 will ON for 15
second if sensor S1 is ON that indicates two product too near to each other for marking
process.
f. Simple Conveyor Belt Motor Control.
When the start push button is pushed, motor will move from left to right. When LS1 ON that
indicates the end of line, the motor will stop for 5 second. Then it will move to home position
until LS2 ON that indicates the home position.
g. Multiple Conveyor Belt Sequence Motor Control.
When push button PB0 being pressed, and S1 detected the product then conveyor 0 will ON.
The product will move from right to left until the end of the conveyor 0. By this S2 will ON that
detect the product, and conveyor 1 will ON the product will transfer from conveyor 0 to
conveyor 1. 10 second after that conveyor 0 will OFF. The product will move until the end of
the conveyor 1. By this S3 will ON that detect the product, and conveyor 2 will ON and the
product will transfer from conveyor 1 to conveyor 2. 10 second after that conveyor 0 will OFF.
The product will move until the end of the conveyor 0 where S4 will ON detect the product
and conveyor 2 will OFF. This is complete sequence of the process.
h. Simple Washing Machine.
When the start push button PBO being pressed, the solenoid valve SV0 will ON for 30 second
that allowing water to fill – in the washing basin. After that motor M0 will ON for 120 second.
Then the solenoid valve SV1will ON for 30 second that allowing water to drain out from
washing basin. Then the solenoid valve SV0 will ON for second times for 30 second that the
allowing water to fill in the washing basin again. After that motor M0 will again ON for 120
second. Then the solenoid valve SV1 will again ON for 30 second that allowing water to drain
out from the washing basin for third times.
i. Simple One Way Traffic Light.
A road is under construction, so it will allow only one way of traffic at one time. Design a traffic
light that contain only green G1, yellow Y1, red R1, green G2, yellow Y2, and red R2 to manage
the traffic.
j. Four Junction Traffic Light.
Design a complete four junction traffic light system based on the junction at Jalan Langgar and
Jalan Sultanah in Alor Setar Kedah.
k. Basic Oven for Product Drying Process.
After the product being placed in the oven, sensor S0 will ON and when they started push
button PBI being pressed once, the oven heater H0 will ON for 2 minutes. After that the heater
will OFF and a bell B1 will ON for 1 second indicates that the heating process completed.
l. Basic Robot Controller.
When the start push button PB0 being pressed, solenoid valve SV0 will ON, the robot will
move from left to right. Two second after that solenoid valve SV1 will ON, the robot arm will
move forward. Two second after that the solenoid valve SV2 will ON, the robot gripper will
grip the product. Two second after that the solenoid valve SV0 will off the robot will move
from right to left. Two second after that solenoid valve SV1 will OFF, the robot arm will be
move backward. Two second after that the solenoid valve SV2 will OFF, the robot gripper will
lose the grip of the product. This process will be repeated.
m. Basic drill Machine.
When push button PB0 being pressed and sensor S1 ON indicate the present of material, drill
Y0 will ON and it move forward. When it reach the end sensor S2 will ON. It will stop but drill
Y0 still ON for 5 second. After that drill will OFF and it will move backward until it reach home
position.
n. Product Parking Conveyor.
When start push button PB0 being pressed, the conveyor and lift will move upward. When LS1
ON, the lift will stop for 3 second and cylinder Y2 will ON for 1 second. Then the lift will move
up again and the whole process will be repeated until 10 stack of product being push to the
conveyor. When LS10 ON, the lift will stop for 5 second, before move downward to the home
position. Then the conveyor will OFF.
TUTORIAL 5: COUNTER EXERCISE.

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.

a. Dead Man Handle.


Motor M0 will JOG (ON) if push button PB1 being pressed at the same time. Used internal
relay R0 to R62F for holding purposes.

b. Fail – Save Water Tank.


If the push button PB0 being pressed and the water level sensor S1 is low, pump motor M0
will ON. Then if the stop push button PB2 being pressed and S2 ON, the motor will stop.

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.

d. Roller Shutter Control.


If sensor S0 sense the leading edge of a lorry, it will open the roller shutter where motor M0
will ON until hit limit switch LS0. Then if sensor S1 sense the trailing edge of the lorry, it will
close the roller shutter where motor M0 will ON until it hit limit switch LS1.

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.

You might also like