7 plc omron addressing and instruction

Upload: febert-tobing

Post on 07-Jul-2015

392 views

Category:

Documents


1 download

TRANSCRIPT

Pertemuan 7

7. PLC Addressing & Basic Instruction (Omron, Siemens, Schneider) Handy Wicaksono Jurusan Teknik Elektro Universitas Kristen Petra

SasaranMahasiswa mampu :Memahami bermacam macam sistem bilangan Memahami macam macam pengalamatan dan instruksi PLC Omron, Siemens, Schneider Memahami instruksi instruksi dasar pada PLC Omron, Siemens, Schneider

Sistem Bilangan1. 2. 3.

4. 5.

Sistem bilangan desimal Sistem bilangan biner Sistem bilangan BCD (binary coded desimal) Sistem bilangan oktal Sistem bilangan heksadesimal

Sistem DesimalBilangan desimal menggunakan 10 digit bilangan : 0 - 9Bobot pada Sistem Desimal 1000s 100s 10s 1s2 2 710 bilangan desimal 7 x 100 = 7 2 x 101 = 20 2 x 102 = 200 Bilangan Desimal 22710

Sistem Bilangan BinerBilangan biner hanya menggunakan 2 digit bilangan : 0 dan 1Bobot pada Sistem Biner 8s Biner 8s 0 0 0 0 4s 0 0 0 0 2s 0 0 1 1 1s 0 1 0 1 0 1 2 3 4s 2s 1s Desimal

Sistem Bilangan BinerNomor bit Most Significant Bit 7 1 6 1 5 0 4 0 3 1 2 1 1 0 0 1 Least Significant Bit bilangan biner 1 x 20 = 0 x 21 = 1 x 22 = 1 x 23 = 0 x 24 = 1 0 4 8 0

0 x 25 = 0 1 x 26 = 64 1 x 27 = 128 Bilangan Desimal 20510

Sistem Binary Coded DecimalBCD : Pencampuran antara sistem biner dan desimal 4 bit digunakan untuk menampilkan bilangan desimal (0 sampai 9) Pada PLC, umumnya digunakan untuk operasi matematis, karena manusia umumnya menggunakan desimal (bukan biner atau heksadesimal).

Sistem Binary Coded DecimalBilangan Desimal 973

1001

0111

0011

Binary Coded Decimal Perhatian : BCD tidak sama dengan bilangan biner! 973 (desimal) ialah 1001 0111 0011 (BCD) sedangkan biner 0011 1100 1101

Sistem OctalMenggunakan 8 digit (0 7).Bobot pada Sistem Oktal 512s 64s 8s3 2 0 78 bilangan oktal 7 x 80 = 0 x 81 = 7 0

1s

2 x 82 = 128 3 x 83 = 1536 Bilangan Desimal 167110

Sistem OctalBeberapa pembuat PLC menggunakan sistem oktal untuk penomoran memoryContoh : Siemens

Sistem HeksadesimalMenggunakan 16 digit0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F Bobot pada Sistem Heksadesimal 4096s 256s 16s 1s2 0 D16 bilangan hex D x 160 = 13 0 x 161 = 0 2 x 162 = 512 Bilangan Desimal 52510

Sistem HeksadesimalKonversi hexadesimal Hex binary

7 D 3 F

0111

1101

0011 1111

Binary

0111110100111111

Sistem HeksadesimalBeberapa pembuat PLC menggunakan sistem heksadesimal untuk penomoran memoryContoh : Omron, Modicon Schneider, dll

Pengalamatan PLC Banyak sekali merk PLC!Banyaknya merk PLC menyebabkan :PLC addressing yang berbeda beda Instruksi instruksi yang berbeda ..

Namun semuanya perlu dikuasai dengan baik

Perlu mempelajari berbagai merk PLCKuliah :PLC Schneider : Zelio, Concept (PLC simulator) PLC Omron,

Praktikum :PLC Omron PLC Siemens PLC Schneider

AddressingAddress/alamat :Identitas untuk komponen komponen ladder diagram.

Masing masing vendor punya metode pengalamatan masing -masing

PLC Omron Addressing (1)Data Area/ Memory Area

IR 000 00Channel/ Word Bit

PLC Omron Addressing (2)Data area / Memory area :Wilayah memori / alamat tertentu Sebagai identitas

Channel / wordMewakili 16 bit data

BitData biner, hanya terdiri dari 1 dan 0

PLC Omron Addressing (3)Channel IR 000, terdiri dari : IR 00000 IR 00008 IR 00001 IR 00009 IR 00002 IR 00010 IR 00003 IR 00011 IR 00004 IR 00012 IR 00005 IR 00013 IR 00006 IR 00014 IR 00007 IR 00015 16 bit!

PLC Omron Addressing (4)CH 000 00000 00001 00002 00003 00004 00005 Channel 000 Bit 00 to Bit 15 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 1 1 0 1 1 0 0 1 1 1 1 0 0 0 0 1 1 0 0 0 8 (heksa) 0 1 1 1 7 (heksa) 8 7 9 B (heksa) 1 0 0 1 9 (heksa) Least Significant Bit (LSB) 1 0 1 1 B (heksa)

Most Significant Bit (MSB)

PLC Omron Addressing (5)Alamat berbasis sistem bilangan heksadesimal (1 word = 16 bit) Dalam beberapa hal juga menggunakan sistem BCD

PLC OMRON - Memory Area

Internal Relay

Special Relay

Temporary Relay

Holding Relay

Area Relay

Link Relay

Timer/ Counter

Data Memory

PLC OMRON CPM1 Memory Area

PLC OMRON CPM1 Memory Area

OMRON-Memory AreaIR (Internal Relay)1. 2.

3.

Input Area bit terminal input eksternal Output area bit terminal output eksternal Work area bit internal yang dapat digunakan dalam programming

Merupakan alamat yang paling sering digunakan dalam pemrograman

OMRON - Memory AreaSR (Special Relay) AR (Area Relay)Bit yang menjalankan fungsi khusus dari PLC Contoh :SR 25313 : flag yang selalu bernilai 1 SR 25502 : flag yang memberikan pulsa setiap 1 detik SR 25504 : carry flag yang menyala untuk operasi aritmetika tertentu

OMRON Memory AreaTR (Temporary Relay)Bit yang hanya menyimpan data sementara saja Umumnya muncul dalam operasi aritmetika

HR (Holding Relay)Bit yang tetap menyimpan data dan kondisinya (ON/OFF) meskipun PLC dimatikan

OMRON Memory AreaLR (Link Relay)Alamat yang digunakan untuk kebutuhan jaringan PLC one to one

Timer/CounterAlamat untuk timer dan counter Karena disimpan dalam 1 area, maka nomor timer dan counter tidak boleh sama

OMRON Memory AreaDM (Data Memory)Untuk pengolahan data dalam word Untuk pengaturan setting PLC Untuk menampilkan error code saat terjadi error Hanya dapat dibaca dalam word, bukan bit Contoh : DM 0000 dapat diisi data word DM 6600 setting start up mode PLC

Basic instruction General contact & coilAlamat menunjuk pada IR0000 = IR00000 1000 = IR01000

Harus diberikan pada akhir program

Contoh :1.

2.

Basic instruction Transition ContactPositive Trans. : Differential Up DIFU(13) Negative Trans. : Differential Down DIFD(14)

Aktif selama 1 scan time

Basic instruction Transition Contact

IR 20001 akan menyala selama 1 scan time saat IR 00005 aktif

IR 20003 akan menyala selama 1 scan time setelah IR 00006 mati

Basic instruction Latch CoilLatching coil : KEEP(11)Aktifkan KEEP

Reset KEEP

IR 00000 IR 00006 HR 0100

Contoh :

Timer PLC Omron

Counter PLC Omron

Contoh

Contoh

PLC SiemensMSB I 3 . 4 Bit of byte or bit number Period separates byte address from bit number Byte address Area Identifier MSB = Most Significant Bit LSB = Least Significant Bit I0 I1 I2 I3 I4 I5 I6 I7 7 6 5 4 3 2 LSB 1 0

Data Memory for SIEMENS S7-200 CPU 212Area Identifier I Q M SM V T C Input Output Internal memory bit Special memory bit Variable memory Timer Counter Data Area SIEMENS S7-200 CPU 212 I0.0 to I7.7 Q0.0 to Q7.7 M0.0 to M15.7 SM0.0 to SM45.7 V0.0 to V1023.7 T0 to T63 C0 to C63

Data Memory for SIEMENS S7-200 CPU 212InputMerupakan terminal untuk input fisik.

OutputMerupakan terminal untuk output fisik.

Internal MemoryMewakili control relay, tidak ada barang fisik yang terhubung. Digunakan untuk menyimpan status dummy(perantara) dalam pemrograman.

Data Memory for SIEMENS S7-200 CPU 212Special MemoryDitentukan oleh manufacturer. Memberikan status dan fungsi kontrol untuk PLC.

Variable MemoryUntuk operasi baca ataupun tulis. Terbagi menjadi 2 :Bagian pertama dari V memory (Data Block 1/DB1), terdiri dari 128 bit (V0 V127). Selain disimpan di RAM, data juga dibackup ke EEPROM (non-volatile memory). Bagian ke dua dari V memory (Data Block 1/DB1), terdiri dari 896 bit (V128 V1023). Data disimpan di RAM saja.

Data Memory for SIEMENS S7-200 CPU 212TimerAlat untuk menghitung pertambahan waktu

CounterAlat untuk menghitung jumlah perpindahan dari low ke high pada input counter

Contoh instruksi PLC Siemens

Contoh instruksi PLC Siemens

Contoh Timer

Contoh Counter

PLC SchneiderKonfigurasi Addresing Instruksi dasar, normal dan special coild dan contact Timer dan counter

Addressing I/O module objects in TSX 37-10/21/22Addressing of the main word and bit objects in I/O modules is defined as follows :%Symbol

I or QType of object I = Input Q = Output

X, W, or DFormat X = Boolean W = Word D = Double Word

xPosition 1 to 8 (TSX 37-10) 1 to 10 (TSX 37-21/22)

.

iChannel Number

Addressing I/O module objects in TSX 37-10/21/22EXAMPLE :

5 1 2 3 6 4

7 8

% IW5.3Input Word from Position 5 channel 3

% I1.3Input Bit from Position 1 channel 3

TSX 37-10

% Q4.0Output Bit from Position 4 channel 0

Data Memory StructureSystem words 128 wordsper block

Data DataProgram Constants37-10 37-21/22 default 1 Kwords 2 Kwords max 1 Kwords 17.5 Kwords

std. function blocks Timer %TMI Timer %Ti Counter %Ci Monostable %MNi Registers %Ri Drum controller %DRi Internal words %MWi %MDWi

4 words 4 words 3 words 4 words 4 words 4 words 1 word 2 words

per module and per channel %IW : 0 to 127 words (input) %QW : 0 to 127 words (output) %MW : 0 to 127 words (internal) %KW : 0 to 127 words (constants) %NW{j}k : common words