Anda di halaman 1dari 66

Wilujeng Sumping

di Departemen Ketenagalistrikan
P4TK Bidang Mesin dan Teknik Industri Bandung
1

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

DIKLAT OTOMASI INDUSTRI DENGAN PLC


Tanggal 30 September s.d 11 Oktober 2013

PEMROGRAMAN PLC
Prepared by

Erfi Ilyas
Widyaiswara PPPG Teknologi Bandung Dosen ISO 9000 Consultant & Auditor

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Erfi Ilyas Koto


Lahir di Padang Panjang, Sumatera Barat pada tanggal 24 Juli 1961 Anak pertama dari lima bersaudara Agama Islam Alamat Rumah Komplek Puri Cipageran Indah Blok D 186 Cipageran - Cimahi, 40511 Email : erfiilyas@yahoo.com Pekerjaan Widyaiswara Dosen ISO 9000 Consultant Technical Expert /Auditor ISO 9000
Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Alamat Kantor

P4TK BMTI (PPPG Teknologi) Bandung Jl. Pasantren Km 2 Cibabat - Cimahi, 40513 Tel (022) 6652326, 6654698 Email : erfi@tedcbandung.com

Pendidikan Formal

SD Tamat tahun 1973 SMP Tamat tahun 1976 SMA Tamat tahun 1980 S1 (FPTK IKIP) Tamat tahun 1984 S2 (STIE-IE) Tamat tahun 1999 S3 (Doktor Ilmu Ekonomi Unpar Bandung) Tamat tahun 2013

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Tujuan Pembelajaran
Secara umum pembelajaran pada mata diklat ini bertujuan memberikan bekal pengetahuan dan keterampilan kepada peserta tentang pemrograman dasar Programmable Logic Control (PLC)

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Tujuan Pembelajaran
Secara khusus pembelajaran ini bertujuan agar peserta mampu: 1. Mendeskripsikan sistem I/O adressing 2. Menjelaskan jenis-jenis bahasa pemrograman programmable logic control 3. Membuat program rangkaian dasar (basic circuit) 4. Memprogram berbagai jenis output 5. Memprogram berbagai jenis timer 6. Memprogram berbagai jenis counter

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Lingkup materi PLC


1 2 I/O Adressing

Ladder Diagram
Function Block Diagram Statement List Basic Circuit

3
4 5

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Hubungan PLC dengan Mesin Proses


Manual Commands Human intervention in the control system Process influence the control system

Processing
Output

Mechanics
Actuators

Indicators

Controller indicates result

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Machine process

Input
Controller

Signal transmitter

Konfigurasi Sistem PLC


PROGRAMMABLE CONTROLLER Power Supply

SENSOR
Push button Switch Sensor

AKTUATOR
Output Modules

light, heat temperature position pressure

Input Modules

Central Processing Unit (CPU)

Memory

Motor starters Lights Heater Solenoid valve Alarms Relay

Programmer

Personal Computer Programming Terminal Hand held programmer Light pen programmer

Program

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

1. Input-Output Adressing
Format I/O Addressing
Format I y,z O y,z Penjelasan I O , Input Output

Bit delimiter
Nomor grup (nomor slot dalam rak)

y
z

Nomor chanel (nomor terminal)

Contoh: I 0,1 = input nomor satu pada slot nol O 0 ,2 = output nomor 2 pada slot nol
Created by H. Erfi Ilyas - erfiilyas@yahoo.com

I/O Adressing berbagai Merek PLC


Telemecanique
Allen Bradley Mitsubishi/LG
X Y X1 Y1

Modicon

Siemens S7
I Q .

Input Output Bit delimiter Contoh penulisan

I O , I 0,1

I O / I:1/1

000 010

q
. %i1.1

I 0.1
Q 0.5

00.01

O 0,5

%q2.1 O:6/1

10.01

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Omron

Bahasa Pemrograman PLC (IEC 61131-3)


1 2

Ladder Diagram (LAD) Instruction List (IL) Statement List (STL) Instruction Set (IS) Function Block Diagram (FBD) Function Block Language (FBL) Sequential Function Chart (SFC) Structured Text (ST)

4 5

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

1. Ladder Diagram
1.1. Graphic Test Symbol
Links Horizontal
Menghubungkan elemen program secara seri (input, function block, output) Menghubungkan elemen program secara paralel (input, function block, output)

Vertical Input Normally Open Normally Closed

Conductive bila sinyal kontrol pada


state (keadaan) 1 state (keadaan) 0

Conductive bila sinyal kontrol pada

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

1. Ladder Diagram
1.2. Graphic Action Symbol
Output Direct Inverse Latched Unlatched Jump

( (

) )

Aktif bila sinyal kontrol pada state (keadaan) 1 Tidak aktif bila sinyal kontrol pada state (keadaan) 1 Set output Men-set bit ke state 1 Reset output Me-reset bit ke state 0 Bila output ini aktif, maka eksekusi program akan melompat ke label yang diprogramkan pada output ini

(S)

(R) (J)

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Simbol output berbagai Merek PLC


Telemecanique
Allen Bradley

Modicon

Siemens

Direct Inverse Latched Unlatched Jump

( (

) )

Mitsubishi )

( I) (L)
(U) (JMP) (S) (R) (JMP)
SET

(S)

(S)

Omron
RSET JMP

[ SET ]

(R)
(J)

(R) -->>

[ RST ]
[ CJ ]

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

1. Ladder Diagram

1.3. Function Block


1 2 3

Timer Monostable Counter Drum Controller Register

4
5

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Timer Telemecanique & Modicon


Simbol E C

T
Ti,v P:

D R

C : input untuk memulai proses timimg E : input untuk memungkinkan preset time value D : output bit yang menandakan timer bekerja R : output bit yang menandakan timer mulai berjalan

Timing Diagram
E C

Ti,v D R
Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Timer Telemecanique & Modicon


Simbol E C

T
Ti,v P:

D R

C : input untuk memulai proses timimg E : input untuk memungkinkan preset time value D : output bit yang menandakan timer bekerja R : output bit yang menandakan timer mulai berjalan

Timing Diagram
E C

Ti,v D R
Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Timer - Siemens S7
LAD I 0.1 IN T 37 TON LD TON STL I 0.1 T 37,5

PT

Timing Diagram

I 0.1

T 37 (current) T 37 (bit)

PT=5 PT=5

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Timer - Siemens S7
LAD I 0.1 T5 IN TONR LD TON I 0.1 T 5,5 STL

PT

Timing Diagram

I 0.1

T5 (current) T 5 (bit)

PT=5

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Timer - Omron
LAD 000.01 TIM STL

001
# 0050

Timing Diagram

000.01

# 0050 (current) TIM 001

PT=5 PT=5

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Timer - Mitsubishi
X1 K50

II

(T1

Timing Diagram

X1

K50 (current) T1

PT=5 PT=5

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Timer On-Delay (TON) Allen Bradley


TON
(EN)
TIMER ON DELAY Timer T4:0 Time Base 1.0 Preset 10 Accum 0

(DN)

Using Status Bit


This Bit Is Set When accumulated value is equal to or greater than the preset value And Remains Set Until One of the following

Timer Done Bit DN

rung conditions go false

Timer Timing Bit TT

rung conditions are true and the accumulated value is less than the preset value

rung conditions go false or when the done bit is set

Timer Enable Bit EN

rung conditions are true

rung conditions go false

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Timer Off-Delay (TOF) Allen Bradley


TOF
(EN)
TIMER OFF DELAY Timer T4:0 Time Base 1.0 Preset 10 Accum 0

(DN)

Using Status Bit


This Bit Is Set When And Remains Set Until One of the following rung conditions go false and the accumulated value is greater than or equal to the preset value

Timer Done Bit DN

rung conditions are true

Timer Timing Bit TT

rung conditions are false and the accumulated value is less than the preset value

rung conditions go false or when the done bit is set

Timer Enable Bit EN

rung conditions are true

rung conditions go false

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Monostable Telemecanique & Modicon


Simbol S

T
Ti,v P:

S : input untuk memulai monostabel R : output bit yang menandakan monostabel running

Timing Diagram

Mi,v

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Counter Telemecanique
Simbol R P U D C0
TB: 1s P:5

E D F

R : input untuk me-reset counter ke nol P : input untuk mem-preset nilai hitung (count value) U : input untuk menjalankan upcounting D : input untuk menjalankan downcounting E : output yang menandakan counter empty D : output yang menandakan counter bekerja (done) F : output yang menandakan counter full

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Counter Modicon
Simbol R S CU CD C0
TB: 1s P:5

E D F

: input untuk me-reset counter ke nol : input untuk mem-preset nilai hitung (count value) CU : input untuk menjalankan upcounting CD : input untuk menjalankan downcounting E : output yang menandakan counter empty D : output yang menandakan counter bekerja (done) F : output yang menandakan counter full

R S

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Counter Siemens Step 7


LAD C48 CTUD CU CD I 0.3 R 4 PV STL

I 0.1

I 0.2

LD LD LD CTUD

I 0.1 //Count Up Clock I 0.2 //Count Down Clock I 0.3 //Reset C48,4

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Counter Siemens Step 7


Timing Diagram I 0.1 Up I 0.2 Down I 0.3 Reset 5 4 3 2 C48
(Current)

5 4 3 4

1 0 0

C 48 (bit)

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Counter Omron
000.01 CNT 000.02 001 # 0005 CNT 001 010.01

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Counter Mitsubishi

X1

K5

II
C1 X2

(C1 (Y1 [RST


C1

) ) ]

II II

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Count Up (CTU) Allen Bradley


CTU
(CU)
COUNT UP Counter Preset Accum C5:0 10 0

(DN)

Using Status Bit


This Bit Is Set When

And Remains Set Until One of the following


rung conditions go false and the accumulated value is greater than or equal to the preset value

Timer Done Bit DN

rung conditions are true

Timer Timing Bit TT

rung conditions are false and the accumulated value is less than the preset value

rung conditions go false or when the done bit is set

Timer Enable Bit EN

rung conditions are true

rung conditions go false

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Drum Controller Telemecanique


R U

D
F L=5

R : input untuk kembali ke step 0 U : input untuk naik ke step berikutnya F output yang menandakan cycle selesai (finish)

Column Command bit Step 0 1

0 1

4
O 0,5

3
O 0,4

2
O 0,3

1 0 1 1 0

O 0,2 O 0,1

1 0

0 0

2
3 4

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Drum Controller Modicon


R U

D
F L=5

R : input untuk kembali ke step 0 U : input untuk naik ke step berikutnya F output yang menandakan cycle selesai (finish)

Step BIT 0 1 2 3

0 1 0 0 0

1 0 1 0 0

2 0 0 1 0

Command %q2.1 %q2.2 %q2.3 %q2.4

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Sequencer Output (SQC) Allen Bradley


SQO
(EN)
SEQUENCER OUTPUT File #N7:1 Mask OFOF Dest O:6.0 Control R6:0 Length 4 Position 0

(DN)

Sequencer output File #N7:1


Word Step 0000 0000 0000 0000 1010 0010 1111 0101 1111 0101 0100 1010 0101 0101 0101 0101 0000 1111 0000 1111
0

External Outputs Associated with O:6 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15

ON ON

Destination O:6.0
15 8 7 0

N7:1
2 3 4

1
2 3 4

0000 0101 0000 1010

Current Step

ON ON

Mask Value OFOF


15 8 7 0

0000 1111 0000 1111

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Register Telemecanique & Modicon


Simbol
R R

F
E

I O

R I O F E

: input untuk me-reset register ke nol : input untuk memasukkan word ke register : input untuk mengeluarkan word dari register : output yang menandakan register full : output yang menandakan register empty

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Basic Circuit
1. Rangkaian YES
Circuit Diagram Ladder Diagram I0,1 O0,1

II
S1

( )

Tabel Kebenaran Input I 0,1 0 Output O 0,1 0

K1

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Basic Circuit
2. Rangkaian NOT
Circuit Diagram Ladder Diagram I0,2 O0,2

I/I
S2

( )

Tabel Kebenaran Input I 0,3 0 Output O 0,3 1

K2

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Basic Circuit
3. Rangkaian AND
Circuit Diagram
Ladder Diagram I0,3 I0,4 O0,3

II II
S3

( )

Tabel Kebenaran
S4

K3

Input I 0,3 0 0 1 1

Input I 0,4 0 1 0 1

Output O 0,3 0 0 0 1

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Basic Circuit
4. Rangkaian OR
Circuit Diagram Ladder Diagram I0,5 O0,4

II
S5

( )

S6

I0,6

II
Tabel Kebenaran
K4

Input I 0,5 0 0 1 1

Input I 0,6 0 1 0 1

Output O 0,4 0 1 1 1

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Latihan 1.1
Circuit Diagram
Ladder Diagram I0,1
I0,1 I0,2

I0,3

O0,1

II
I0,2

II

( )

II
I0,3

O0,1

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Latihan 1.2
Circuit Diagram Ladder Diagram I0,4
I0,4 I0,5 O0,2

I0,6

I0,7

O0,2

II
I0,5

I/I

I/I

( )

II
I0,6

O0,2

II

I0,7

O0,2

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Latihan 1.3
Circuit Diagram Ladder Diagram I0,8
I0,8

I0,9

I0,10

O0,3

I/I

I/I

II
I0,11 I0,12

( )

I/I
I0,9 I0,10 I0,11 I0,12

II

O0,3

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Latihan 1.4
Circuit Diagram Ladder Diagram I0,13 I0,14 O0,4

II
I0,13 I0,14

II

( )
O0,5

( )

O0,4

O0,5

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

2. Function Block Diagram (FBD)


Basic Element
No Designation 1 Identity (YES) Simbol dan Logic Equation
x A=x

Tabel Kebenaran
x 0 1

Keterangan
Output A akan logic 1 bila input x logic 1

A
0 1 A 1 0

Negation (NOT)

x A=x

x
0 1

Output A akan logic 1 bila input x logic 0 dan sebaliknya

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

2 Function Block Diagram (FBD)


Basic Element
No Designation 3 Simbol dan Logic Equation
x y

Tabel Kebenaran
x
y 0 1 0 1 y 0 1 0 1 A 0 0 0

Keterangan
Output A hanya akan logic 1 bila kedua input x dan y logic 1

AND

&

0 0 1 1 x

A=xy

1
A 0 1 1 1 Output A akan logic 1 bila salah satu atau kedua input x dan y logic 1

OR

x y

0 0 1 1

A=xVy

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

2. Function Block Diagram (FBD)


Basic Element
No Designation 5 Simbol dan Logic Equation
y x

Tabel Kebenaran
x
y 0 1 0 1 y 0 1 0 1 A 0 0 1

Keterangan
Output A hanya akan logic 1 bila input x logic 1 dan input y logic 0

Exclusion

&

0 0 1 1 x

A=xy

0
A 1 0 1 1 Output A hanya akan logic 0 bila input x logic 0 dan input y logic 1

Inclusion

y x

0 0 1 1

A=xVy

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

2. Function Block Diagram (FBD)


Basic Element
No Designation 7 Simbol dan Logic Equation
x y

Tabel Kebenaran
x
y 0 1 0 1 y 0 1 0 1 A 1 1 1

Keterangan
Output A hanya akan logic 0 bila kedua input x dan y logic 1

NAND

&

0 0 1 1 x

A = (xy)

0
A 1 0 0 0 Output A hanya akan logic 1 bila kedua input x dan y logic 0

NOR

x y

0 0 1 1

A = (xVy)

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

2. Function Block Diagram (FBD)

Stop

I0.1

I0.2 Start I0.2 K1 O0.1 O0.1

&
K1 O0.1 I0.1 Circuit Diagram Function Block Language

O0.1

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

2. Function Block Diagram (FBD)

Stop

I0.1

I 2 START

&
Start I0.2 K1 Q0.1 = K1 Q0.1 Q1

Q 1 MOTOR

I 1 STOP

MOTOR

Circuit Diagram

Function Block Language PLC Lucas Nulle

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

2. Function Block Diagram (FBD)

Stop

I0.1 I 0.1

&

Start

I0.2

K1 O0.1

Q 0.1

1
Q 0.1

I 0.2 K1 O0.1

Circuit Diagram

Function Block Language PLC Klockner-Moeller

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

2. Function Block Diagram (FBD)

Stop

I0.1

Start

I0.2

K1 O0.1

I 0.2 Q 0.1

OR
I 0.1

AND

Q 0.1

K1

O0.1

Circuit Diagram

Function Block Language PLC Siemens (STEP 7-Micro/Win 3.2

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Latihan 2.1

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Latihan 2.2

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

3. Instruction List (IL)

Adress

Seluruh instruksi yang diberikan akan menerima nomor lokasi memory (adress). PLC melaksanakan instruksi sesuai dengan adress yang diminta. Adress ini biasanya dinyatakan dalam angka dan menggunakan tiga digit Misal: 000 001 002 instruksi pertama instruksi kedua instruksi ke tiga dan seterusnya

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

3. Instruction List (IL)


Operation
Operation memberitahukan pada PLC apa yang harus dilakukan, membaca status sinyal, penentuan tipe rangkaian seri atau paralel atau penetapan lokasi hasil dari rangkaian

Misal:

LI0.1
OI0.2 =Q0.1

Load status sinyal dari input 0.1 ke dalam working register Input 0.2 terhubung paralel dengan input 0.1 (rangkaian OR) Lokasi hasil rangkaian adalah pada output 0.1

Jenis-jenis operation yang lain diantaranya adalah: L A O XO =


Created by H. Erfi Ilyas - erfiilyas@yahoo.com

: Load : AND : OR : Exclusive OR : Allocation

3. Instruction List (IL)

Operand

Kalau operation menyatakan apa yang harus dilakukan, maka operand menyatakan dengan apa instruksi itu harus dilaksanakan. Dari contoh di atas yang menjadi operand adalah input 0.1, input 0.2 dan output 0.1. Untuk mengidentifikasi jenis operand digunakan notasi sebagai berikut: N I Q M : Negation : Input : Output : Marker

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Diagram Instruksi Instruction List (IL)


Adress (lokasi memory)
Instruksi (isi lokasi memory)

Operation

Operand

Identifikasi Tipe Operand

Parameter No Operand

005
Program terdiri dari 6 instruksi

L
L = Load atau baca status input

I
I = Input Nomor unit/slot

0.1
Nomor terminal

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Notasi IL berbagai Merek PLC


BBC Pr b Siemens S7
LD O

Mitsubishi

Klocner M PS3

Modicon

Load OR AND Negation

L O A N =

U O

! / & N =

LOAD

LD OR

LD OR

OR
AND NOT OUT X Y

U
N =

AND
N ST

A
N =

AND
NOT OUT

= Input
Output

I
Q

E
A

E
A

I
Q

I
Q

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Omron
000
010

AEG

Contoh Pemograman dengan Instruction List


Klockner Moeller
Start

AEG U O UN = E1 A1 E2 A1

I0.1

K1 Q0.1

L O AN =

I 0.1 Q0.1 I 0.2 Q0.1

Stop

I0.2

BBC
! / &N = E02,01 A07,01 E02,02 A07,01

Mitsubishi
LD OR ANDI = X001 Y030 X002 Y030

K1

Q0.1

Circuit Diagram

Statement List

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Contoh Pemograman dengan Instruction List


Modicon
Start

Siemens LD O AN = I0.1 Q0.1 I0.2 Q0.1

I0.1

K1 O0.1

LD OR ANDN ST

% I1.1 %Q2.1 % I1.2 %Q2.1

Stop

I0.2

Omron
LD OR ANDNOT OUT 000.01 010.01 000.02 010.01
Statement List

K1

O0.1

Circuit Diagram

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Latihan 3.1
Circuit Diagram Statement List

I1.1

I1.2

Q2.1

I1.3

Modicon LD OR OR ANDN ANDN ST


Omron LD OR OR ANDNOT ANDNOT OUT END

%I1.1 %I1.2 %Q2.1 %I1.3 %I1.4 %Q2.1

I1.4

Q2.1

000.01 000.02 010.01 000.03 000.04 010.01

Siemens Network //Percb 1 LD I0.1 O I0.2 O Q0.1 AN I0.3 AN I0.4 = Q0.1 Network //Akhir Prog MEND

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Latihan 3.2
Circuit Diagram Statement List

I0,8

I0,9 I0,10 I0,11 I0,12

O0,3

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Latihan 3.3
Circuit Diagram Statement List

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

TERIMAKASIH

Created by H. Erfi Ilyas - erfiilyas@yahoo.com

Tell me and I forgot Show it to me and I will remember Let me do it And I will understand
(Confuzius)

Created by H. Erfi Ilyas - erfiilyas@yahoo.com