Anda di halaman 1dari 16

Sequence Control dan Data Handling

Tujuan

 Mampu menggunakan master control relay pada pemograman PLC LD


 Mampu menggunakan data handling pada pemograman PLC LD
Alat dan Bahan

 Komputer
 Kit PLC
 Kit Motor DC
 Jumper

Pendahuluan

Dalam kontrol urutan operasi (sequence control), dibutuhkan fungsi yang dapat mengontrol sekelompok bit
secara bersamaan. Dalam hal ini PLC menyediakan blok yang merepresentasikan fungsi kontrol on/off
sekelompok bit secara bersama (master control), melewati sekelompok bit (jump), mengulang sekelompok bit
(loop).

Suatu sistem yang dikontrol logika sederhana biasanya hanya menggunakan bit kontrol, misalnya suatu kontrol
dengan satu sinyal on/off. Akan tetapi untuk suatu sistem yang kompleks dan kontiniu kontrol membutuhkan
sekelompok bit, untuk hal tersebut PLC menyediakan blok data yang merepresentasikan nilai, sekelompok bit
tersebut dalam PLC dikenal dengan kata (Word). Pengolahan data dalam pemograman PLC dikenal dengan
istilah data handling. Data handling terdiri dari operasi; perpindahan data dari satu lokasi memori word ke lokasi
lainnya, penambahan dan pengurangan, perbandingan nilai, dan pengoperasian aritmatika.

Prosedur

1. Persiapkan PLC.
2. Persiapkan kit motor DC.
3. Merangkai sesuai dengan job sheet.
4. Rapihkan peralatan setelah selesai praktikum.

Master control relay (MCR)

Pada sistem kontrol listrik master control relay (MCR) digunakan untuk menghentikan (shut down) setiap bagian
dari sistem kelistrikan. Konsep pada sistem kelistrikan ini dapat diimplementasikan pada LD. Jika pada suatu
sistem yang akan dikontrol memliki output yang banyak, jika suatu dibutuhkan suatu kondisi output dapat
diaktifkan atau dihentikan secara keseluruhan maka dapat digunakan kontak internal relay yang sama pada
masing-masing rung dari LD. Hal ini dapat diganti dengan menggunakan MCR. Fungsi MCR pada LD terdiri
dari blok terpisah yang menandakan awal dan akhir seperti yang ditunjukan pada gambar 7.1. Rung yang berada
diantara MC dan MCR dapat dieksekusi jika input 1 kondisi “on”.

Hal VII.1
gambar 7. 1 prinsip dasar event MCR
dalam PLC omron event MCR tertuang dalam instruksi Interlock (IL) dan Interlock Clear (ILC), seperti yang
ditunjukan dalam tabel 7.1. saat instruksi IL di eksekusi maka instruksi yang berada di antara IL dan ILC akan
diberlakukan berbeda seperti yang ditunjukkan pada tabel 7.2

tabel 7. 1 symbol dan data area oprand dari instruksi IL dan ILC
code symbol Data Area Operand
IL -

ILC -

tabel 7. 2 kondisi instruksi yang berada didalam IL dan ILC


item treatment
Instruction execution Instructions other than OUT, OUT NOT, OUTB(534), and
timer instructions are not executed.
Output status in instructions Except for outputs in OUT, OUT NOT, OUTB(534), and
timer instructions, all outputs retain their previous status.
Bits in OUT, OUT NOT, OUTB(534) OFF
Status of timer instructions Reset
(except (TTIM(087), TTIMX(555),
MTIM(543), and MTIMX(554))

Jump

event jump digunakan untuk mempercepat scanning program dari satu titik awal (Jump) ketitik akhir (Jump
End). Jika jump ON maka program yang ada diantara Jump dan Jump end akan di eksekusi. Jika Jump OFF
maka program yang ada diantara Jump dan Jump end akan mengingat kondisi terakhir pogram tersebut.
Penulisan event jump ditunjukan pada gambar 7.2.

Hal VII.2
gambar 7. 2 pronsip dasar event jump

pada PLC omron event jump dituliskan dalam instruksi jump (JMP) dan jump end (JME). Simbol dan area
operand ditampilkan pada tabel 7.3. perlakuan pada saat instruksi jump aktif di tunjukan pada tabel 7.4

tabel 7. 3 symbol dan data area oprand dari instruksi jump dan jump end
code Symbol Data Area Operand
JMP #0000 s/d #00FF

JME #0000 s/d #00FF

tabel 7. 4 kondisi instruksi yang berada didalam IL dan ILC


item treatment
Instruction execution No instructions are executed.
Output status in instructions All outputs retain their previous status.
Bits in OUT, OUT NOT, OUTB(534) All outputs retain their previous status.
Status of timer instructions Operating timers (TIM, TIMX(550), TIMH(015),
(except (TTIM(087), TTIMX(555), TIMHX(551), TMHH(540), TMHHX(552) only) continue
MTIM(543), and MTIMX(554)) timing because the PVs are updated even when the timer
instruction is not being executed.

Loop

event loop digunakan untuk mengulang scanning program dari satu titik awal (FOR) ke titik akhir (NEXT). Jika
for ON maka program yang ada diantara for dan next akan di eksekusi berulang sebanyak nilai yang di input
dalam instruksi FOR. Akan tetapi jika didalam instruksi for terdapat fungsi pemotongan (BREAK), maka
instruksi akan mengakhiri loop tersebut.

Hal VII.3
gambar 7. 3 event loop dengan instruksi for

pada PLC omron event loop dituliskan dalam instruksi FOR, NEXT dan BREAK. Simbol dan area operand
ditampilkan pada tabel 7.3. perlakuan pada saat instruksi jump aktif di tunjukan pada tabel 7.4

tabel 7. 5 symbol dan data area oprand dari instruksi FOR, NEXT, BREAK
code symbol Data Area Operand
FOR #0000 #FFFF

NEXT -

BREAK -

Perpindahan data

event perpindahan data digunakan untuk memindahkan data (dalam Word) dari satu area memory ke area
memory lainnya. Didalam PLC omron event perpindahan data terbagi dalam beberapa instruksi seperti yang
ditunjukan pada tabel 7.6

tabel 7. 6 instruksi perpindahan data pada PLC omron CP1L


instruction code symbol Descripstion
Block Set BSET BSET(071) copies the same source
word (S) to all of the destination words
in the range St to E.

Data COLL COLL(081) copies the source word


Collect (calculated by adding Of to Bs) to the
destination word. The same
COLL(081) instruction can be used to
collect data from various source words
in the data area by changing the value
of Of.

Hal VII.4
instruction code symbol Descripstion

Single DIST DIST(080) copies S to the destination


Word word calculated by adding Of to Bs.
Distribute The same DIST(080) instruction can
be used to distribute the source word to
various words in the data area by
changing the value of Of.

Move MOV Transfers S to D. If S is a constant, the


value can be used for a data setting.

Move Bit MOVB C: Control Word


The rightmost two digits of C indicate
which bit of S is the source bit and the
leftmost two digits of C indicate which
bit of D is the destination bit.

Move MOVD S: Source Word


Digit The source digits are read from right to
left, wrapping back to the rightmost
digit (digit 0) if necessary.

C: Control Word
The first three digits of C indicate the
first source digit (m), the number of
digits to transfer (n), and the first
destination digit (l), as shown in the
following diagram.

D: Destination Word
The destination digits are written from
right to left, wrapping back to the
rightmost digit (digit 0) if necessary.

Hal VII.5
instruction code symbol Descripstion

Double MOVL MOVL(498) transfers S+1 and S to


Move D+1 and D. If S+1 and S are constants,
the value can be used for a data setting.

Move Not MVN MVN(022) inverts the bits in S and


transfers the result to D. The content of
S is left unchanged.

Double MVNL MVNL(499) inverts the bits in S+1


Move Not and S and transfers the result to D+1
and D. The contents of S+1 and S are
left unchanged.

Double XCGL XCHG(073) exchanges the contents of


Data E1+1 and E1 with the contents of
Exchange E2+1 and E2.

Data XCHG XCHG(073) exchanges the contents of


Exchange E1 and E2.

Block XFER XFER(070) copies N words beginning


Transfer with S (S to S+(N–1)) to the N words
beginning with D (D to D+(N–1)).

Transfer XFRB XFRB(062) transfers up to 255


Bits consecutive bits from the source words
(beginning with bit l of S) to the
destination words (beginning with bit
m of D). Bits in the destination words
that are not overwritten by the source
bits are left unchanged.
The beginning bits and number of bits
are specified in C, as shown in the
following diagram.

Increment & decrement

event increment dan decrement digunakan untuk menjumlah dan mengurang 1 digit satiap satu siklus. Didalam
PLC omron event increment dan decrement terbagi dalam beberapa instruksi seperti yang ditunjukan pada tabel
7.7

Hal VII.6
tabel 7. 7 instruksi increment & decrement pada PLC omron CP1L
instruction code symbol Descripstion
Increment ++ The ++(590) instruction adds 1 to the binary
Binary content of Wd. The specified word will be
incremented by 1 every cycle as long as the
execution condition of ++(590) is ON. When the
up-differentiated variation of this instruction
(@++(590)) is used, the specified word is
incremented only when the execution condition
has gone from OFF to ON.

Double ++L The ++L(591) instruction adds 1 to the 8-digit


Increment hexadecimal content of Wd+1 and Wd. The
Binary content of the specified words will be
incremented by 1 every cycle as long as the
execution condition of ++L(591) is ON. When
the up-differentiated variation of this instruction
(@++L(591)) is used, the content of the specified
words is incremented only when the execution
condition has gone from OFF to ON.

Decrement -- The – –(592) instruction subtracts 1 from the


Binary binary content of Wd. The specified word will be
decremented by 1 every cycle as long as the
execution condition of – –(592) is ON. When the
up-differentiated variation of this instruction (@
– –(592)) is used, the specified word is
decremented only when the execution condition
has gone from OFF to ON.

Double --L The – –L(593) instruction subtracts 1 from the 8-


Decrement digit hexadecimal content of Wd+1 and Wd. The
Binary content of the specified words will be
decremented by 1 every cycle as long as the
execution condition of – –L(593) is ON. When
the up-differentiated variation of this instruction
(@– –L(593)) is used, the content of the specified
words is decremented only when the execution
condition has gone from OFF to ON.

Increment ++B The ++B(594) instruction adds 1 to the BCD


BCD content of Wd. The specified word will be
incremented by 1 every cycle as long as the
execution condition of ++B(594) is ON. When
the up-differentiated variation of this instruction
(@++B(594)) is used, the specified word is
incremented only when the execution condition
has gone from OFF to ON.

Double ++BL The ++BL(595) instruction adds 1 to the 8-digit


Increment BCD content of Wd+1 and Wd. The content of
BCD the specified words will be incremented by 1
every cycle as long as the execution condition of
++BL(595) is ON. When the up-differentiated
variation of this instruction (@++BL(595)) is

Hal VII.7
instruction code symbol Descripstion
used, the content of the specified words is
incremented only when the execution condition
has gone from OFF to ON.

Decrement --B The – –B(596) instruction subtracts 1 from the


BCD BCD content of Wd. The specified word will be
decremented by 1 every cycle as long as the
execution condition of – –B(596) is ON. When
the up-differentiated variation of this instruction
(@– –B(596)) is used, the specified word is
decremented only when the execution condition
has gone from OFF to ON.

Double --BL The – –BL(597) instruction subtracts 1 from the


Decrement 8-digit BCD content of Wd+1 and Wd. The
BCD content of the specified words will be
decremented by 1 every cycle as long as the
execution condition of – –BL(597) is ON. When
the up-differentiated variation of this instruction
(@– –BL(597)) is used, the content of the
specified words is decremented only when the
execution condition has gone from OFF to ON.

Perbandingan data

event perbandingan data digunakan untuk membandingkan dua data dalam satu siklus. Didalam PLC omron
CP1l berfungsi sebagai input, sehingga diletakan ditengah rung. Event perbandinga data terbagi menjadi terbagi
dalam beberapa instruksi seperti yang ditunjukan pada tabel 7.8
tabel 7. 8 instruksi compare pada PLC omron CP1L
instruction code symbol Descripstion
Input = (Equal) The input comparison instruction
Comparison < > (Not equal) compares S1 and S2 as signed or
< (Less than) unsigned values and creates an
<= (Less than or equal) ON execution condition when the
> (Greater than) comparison condition is true.
>= (Greater than or equal) Unlike instructions such as
CMP(020) and CMPL(060), the
data format: result of an input comparison
None: Unsigned data instruction is reflected directly as
S: Signed data an execution condition, so it is
not necessary to access the result
Data length: of the comparison through an
None: One-word data Arithmetic Flag and the program
L: Double-length data is simpler and faster.
Time =DT (Equal) The time comparison instruction
Comparison < >DT (Not equal) compares the unmasked values
< DT (Less than) (corresponding bit of C set to 0)
<=DT (Less than or equal) of the present time data in S1 to
>DT (Greater than) S1+2 with the comparison time
>=DT(Greater than or equal) data in S2 to S2+2 and creates an
ON execution condition when the
comparison condition is true. At
the same time, the result of a time

Hal VII.8
instruction code symbol Descripstion
comparison instruction is
reflected in the arithmetic flags
(=, <>, <, <=, >, >=).
There are 18 possible
combinations of time comparison
instructions.
Any time values that are masked
in the control word (C) are not
included in the comparison.

tabel 7. 9 alamat calender pada PLC omron CP1L

Addresses Contents

A351.00 to A351.07 Second (00 to 59, BCD)

A351.08 to A351.15 Minute (00 to 59, BCD)

A352.00 to A352.07 Hour (00 to 23, BCD)

A352.08 to A352.15 Day of month (01 to 31, BCD)

A353.00 to A353.07 Month (01 to 12, BCD)

A353.08 to A353.15 Year (00 to 99, BCD)

A354.00 to A354.02 Day (0 to 6, BCD)

Pengoperasian aritmatik

event aritmatik digunakan untuk pengoperasian dasar aritmatika diantaranya +, -, *, /. Event aritmatika pada PLC
omron diantaranya ditunjukan pada tabel pada tabel 7.10
tabel 7. 10 instruksi compare pada PLC omron CP1L
instruction code symbol Descripstion
add +, +L, +C, +CL, +B, +BL, +(400) adds the binary values in
+BC, +BCL Au and Ad and outputs the result
to R.
data format:
None: Signed Binary data
B: BCD data

Carry flag:
None: Without Carry
C: With Carry

data length:
None: One-word data
L: Double-length data
subtract -, -L, -C, -CL, -B, -BL, -BC, –(400) subtracts the binary values
-BCL in Su from Mi and outputs the
result to R. When the result is
data format: negative, it is output to R as a 2's
None: Signed Binary data complement. (Refer to DOUBLE
B: BCD data SIGNED BINARY SUBTRACT
WITHOUT CARRY:–L(411) for
Carry flag: an example of handling 2's

Hal VII.9
instruction code symbol Descripstion
None: Without Carry complements.)
C: With Carry

data length:
None: One-word data
L: Double-length data
Multiply *, *L, *C, *CL, *B, *BL, *(420) multiplies the signed
*BC, *BCL binary values in Md and Mr and
outputs the result to R, R+1.
data format:
None: Signed Binary data
B: BCD data

Carry flag:
None: Without Carry
C: With Carry

data length:
None: One-word data
L: Double-length data
Divide /, /L, /C, /CL, /B, /BL, /BC, /(430) divides the signed binary
/BCL (16 bit) values in Dd by those in
Dr and outputs the result to R,
data format: R+1. The quotient is placed in R
None: Signed Binary data and the remainder in R+1.
B: BCD data

Carry flag:
None: Without Carry
C: With Carry

data length:
None: One-word data
L: Double-length data

Hal VII.10
Job Sheet
Percobaan 1
Membuat Program dengan instruksi interlock yang terdapat pada PLC omron CP1L
 INSTRUKSI
 Buat [project] baru pada software [cx-programmer]
 Tipe PLC yang digunakan adalah CP1L  CPU L  communication USB
 Buatlah Program PLC LD berikut ini, dengan alamat tertera pada tabel 7.11

gambar 7. 4 LD Percobaan 1
tabel 7. 11 alamat LD percobaan 1

 Transfer program to PLC  Uji Program untuk setiap kemungkinan kondisi input, berikan penjelasan untuk
setiap kemungkinan

Hal VII.11
Percobaan 2
Membuat Program dengan instruksi jump yang terdapat pada PLC omron CP1L
 INSTRUKSI
 Buat [project] baru pada software [cx-programmer]
 Tipe PLC yang digunakan adalah CP1L  CPU L  communication USB
 Buatlah Program PLC LD berikut ini, dengan alamat tertera pada tabel 7.11

gambar 7. 5 LD percobaan 2

 Transfer program to PLC  Uji Program untuk setiap kemungkinan kondisi input, berikan penjelasan untuk
setiap kemungkinan

Hal VII.12
Percobaan 3
Membuat Program dengan instruksi FOR yang terdapat pada PLC omron CP1L
 INSTRUKSI
 Buat [project] baru pada software [cx-programmer]
 Tipe PLC yang digunakan adalah CP1L  CPU L  communication USB
 Buatlah Program PLC LD berikut ini, dengan alamat tertera pada tabel 8.3

gambar 7. 6 LD percobaan 3

 Transfer program to PLC  Uji Program untuk setiap kemungkinan kondisi input, berikan penjelasan untuk
setiap kemungkinan

Hal VII.13
Percobaan 4
Membuat program dengan event pengolahan data pada PLC CP1L
 INSTRUKSI
 Buat [project] baru pada software [cx-programmer]
 Tipe PLC yang digunakan adalah CP1L  CPU L  communication USB
 Buatlah Program PLC LD berikut ini, dengan alamat tertera pada tabel 7.11

gambar 7. 7 LD percobaan 4
 Transfer program to PLC  Uji Program untuk setiap kemungkinan kondisi input, berikan penjelasan untuk
setiap kemungkinan

Hal VII.14
Tugas
1. Suatu tempat parkir dapat menampung sepuluh kendaraan. Tempat parkir tersebut dapat dilihat pada gambar
berikut. Misal kita ingin menerapkan sistem otomasi pada tempat parkir secara sederhana dimana setiap
kendaraan yang masuk diharuskan menekan tombol 1 (input 1), dan bila kendaraan hendak keluar
diharuskan menekan tombol 2 (input 2) sehingga dapat diamati berapa jumlah kendaraan yang keluar atau
masuk. Bila area parkir telah penuh (jumlah kendaraan adalah 10), maka sistem akan menyalakan lampu
(output 1) yang memberikan informasi pada kendaraan yang mau masuk bahwa tempat parkir telah penuh.
Rancang dan desainlah program yang sesuai dengan permasalahan di atas, buatlah simulasi sederhana
menggunakan lampu dan tombol yang tersedia, periksa dan amati hasil program anda! (gunakna fungsi
increment dan decrement
Output 1

Parkir Penuh

Input 1

Area parkir

Input 2

gambar 7. 8 ilustrasi parking lot


2. Buatlah program untuk mengaktifkan seven segment!
Dengan menggunakan 2 saklar dan menggunakan seven segment. Kerjanya:
1. Jika saklar 1 ditekan maka nilai dari seven segment bertambah 1.
2. Jika saklar 2 ditekan maka nilai dari seven segment menjadi 0.

100.00

100.05 100.01
100.06

100.04 100.02

100.03

Hal VII.15
3. Buatlah program ladder diagram dari pengaturan kerja 3 buah mesin dengn menggunakan real time clock,
dimana urutan prosesnya sebagai berikut:
1. 06.00-18.00, mesin ketiganya bekerja
2. 18.00-22.00, mesin a yang bekerja
3. 22.00-02.00, mesin b yang bekerja
4. 02.00-06.00, mesin c yang bekerja

Hal VII.16

Anda mungkin juga menyukai