100% found this document useful (2 votes)
207 views45 pages

Basic PLC

This document provides information about basic PLCs from Schneider Electric, focusing on the Modicon M221 PLC. It includes details about the M221's compact and modular configurations, I/O expansion modules, basic functions, advanced functions, wiring diagrams, an example tank level control program, and an overview of Machine Expert programming software. Programming concepts like timers, addressing, and downloading programs are also explained at a high level.

Uploaded by

isilpii4
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
207 views45 pages

Basic PLC

This document provides information about basic PLCs from Schneider Electric, focusing on the Modicon M221 PLC. It includes details about the M221's compact and modular configurations, I/O expansion modules, basic functions, advanced functions, wiring diagrams, an example tank level control program, and an overview of Machine Expert programming software. Programming concepts like timers, addressing, and downloading programs are also explained at a high level.

Uploaded by

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

Basic PLC

Schneider Electric PLC Range


Machine Application Process Application

M262

M580

M251 Quantum

M241
M340
Premium

M221

Control Expert Software


2- 2 Machine Expert Software
PLC Modicon M221
Compact Type

Modular Type

• More Flexibility
• More Simplicity

2- 3
M221 Compact
• Compact Controller
M221 Compact Type :
• Easy to set up
•1 Removable screw terminal block for Power
•2 TM221CE : RJ 45 connector for
Ethernet network
•3 Mini Usb for connecting a PC,
Micro SD slot, and Run/Stop Switch
• 4 Serial Link port (RS 232/ RS 485)
• 5 Analog Input connector
• 6 QR code for technical documentation
• 7 Digital Input Connector
• 8 Slot for Backup Battery
• 9 Lamp Status for PLC,I/O and Comm
• 10 Bus Connector for Expantion Module
• 11 Slot for I/O, Comm,aplication Catridge
• 12 Digital Output Connector
• 13 Dclip for Locking symmetrical ring

2- 4
M221 Expansions
TM3 I/O Module : TM3 Expert IO Module :

Digital / Analog Analog / Safety Motor Stater Remote I/O


Expansions Temperature Expansions Expansions Expansions
Expansions

2- 5
M221 Basic Function
• Timer (On Delay, Off Delay, and Pulse) : 255
• Counter ( Up and Down in the same block) : 255
• Shift Bit Register :8
• Step Counter :8
• Arithmetic (+, -, /, REM, x, LOG, LN, SQRT, ABS, EXP, INC, DEC)
• Trigonometric (Sin, Cos, Tan, aSin, aCos, aTan)
• Conversions
• Comparison
• Jump
• Subroutine
• etc

2- 6
M221 Advanced Function
• LIFO / FIFO Register :4
• Pulse Width Modulation : max. 2
• Pulse Generator : max. 2
• Drum Controller : max. 8
• Fast Counter (max. 5 KHz) : max. 4
• High Speed Counter (max. 100 KHz) : max. 4
• PID Control (AutoTuning Function) : max. 14
• Schedule Block : max. 16
• Clock Functions
• etc

2- 7
PLC Wiring – Input Digital

2- 8
PLC Wiring – Output Digital Transistor

2- 9
PLC Wiring – Output Digital Relay

Relay

2 - 10
Example - Tank Level Control

I / O LIST
INPUTS : OUTPUTS :

- -

- -

- -

- -

2 - 11
Tabel pengalamatan Input Tabel pengalamatan Output

Kode Alamat Keterangan Kode Alamat Keterangan


Objek Objek
S1 I 0.0 Start/Stop pushbutton Q1 Q 0.1 Motor
S2 I 0.2 MAN/AUTO H1 Q 0.5 Pump Running
S3 I 0.4 Low Sensor Switch H2 Q 0.9 Low Level
S4 I 0.6 High Sensor Switch H3 Q 0.13 High Level

2 - 12
Example - Tank Level Control

2 - 13
Kebutuhan Hardware

PLC
Object-
Objects
code DI DO
General
Motor AC 3 fasa 230 V M - -
PLC
M221CE20Routput
Input
S1 x
S2 x
S3 x
S4 x
Output
x
x
x
Numbers of needed inputs 4
Numbers of needed outputs 3

2 - 14
M221 Wiring Schematic – Input

2 - 15
M221 Wiring Schematic – Output

2 - 16
Troubleshooting & Maintenance

Backup Battery

Run/Stop Switch

PLC and I/O Status

Slot Micro SD

Power Supply I/O Removeable Terminal


2 - 17
Troubleshooting & Maintenance
Troubleshooting using The Controller’s LED’s (PLC’s Condition)

2 - 18
Program Error Viewers

2 - 19
Program Error Viewers

Viewers Keterangan

Menandakan, program yang dibuat memiliki beberapa


instruksi yang dapat menyebabkan eksekusi program
Warning menjadi tidak jelas.
Beberapa warning, dapat diabaikan.

Menandakan, program yang dibuat, memiliki kesalahan


yang fatal, sehingga tidak dapat di eksekusi atau di
Errors transfer ke dalam PLC.
Errors TIDAK dapat diabaikan.

2 - 20
Machine Expert Software
FREE FREE (42days), Standard License dan Professional License

2 - 21
Machine Expert Basic – M221 (1)
• Addressing for I/O

Format :
%I x . y I : Input

%Q x . y Q : Output
x : CPU (0) / Expansion (1-14)
y : I/O channel number

2 - 22
Machine Expert Basic – M221 (2)
CPU 1 2

24 IO = 14 DI + 10 DO 16 DI 8 DO

CPU Exp 1 Exp 2


Address DI %I0.0 - %I0.13 %I1.0 - %I1.15 -
Address DO %Q0.0 - %Q0.9 - %Q2.0 - %Q2.7

2 - 23
Machine Expert Basic – M221 (3)
• Addressing for Memory / System Bit

Format :
%Mi i : Number
M : Memory Bit
%Si
(Range : %M0 - %M1023)
S : System Bit
(Range : %S0 - %S159)

2 - 24
Machine Expert Basic – M221 (4)
• Addressing for Memory / System Word

Format : W : Word (16 bit) Range :


%MWi i : Number MW : %MW0 - %MW7999
%SWi M : Memory SW : %SW0 - %SW233
%KWi S : System KW : %KW0 - %KW511
K : Constant

2 - 25
Machine Expert Basic – M221 (5)
• Media for Download / Upload program

Machine Expert Basic

RS 232 / RS485 Cable

RJ45 – Ethernet Cable

Mini USB Cable

2 - 26
Machine Expert Basic – M221 (6)

2 - 27
Machine Expert Basic – M221 (7)

2 - 28
Machine Expert Basic – M221 (8)

2 - 29
Machine Expert Basic – M221 (9)

2 - 30
Machine Expert Basic – M221 (10)

2 - 31
Machine Expert Basic – M221 (11)

1
2
3

Simulation

2 - 32
Machine Expert Basic – M221 (12)

2 - 33
Timer

• Timer digunakan sebagai pengatur waktu proses


• Dapat digunakan sebagai komponen tundaan (Delay) => Timer-On
Delay
• Umumnya untuk otak fungsi yang dapat diatur memeberikan keluaran
kondisi on selama selang waktu tertentu => Timer-Off Delay
• Dapat digunakan untuk membuat pulsa dengan lebar tertentu =>
Timer-Pulsa

2 - 34
Jenis Timer
TON

TP

TOF

t : konstanta / preset timer


2 - 35
Instruksi Timer pada PLC M221

1
Comment, Symbol, Timer Number

2
4

Input Timer Output Timer

Timer Description

2 - 36
Blok Fungsi Timer
Parameter Label Value
Comment - Comment / Info untuk block Timer
Symbol - Nama block Timer

Timer Number %TMi 0 s/d 255

Jenis TON On-delay (by default)

TOF Off-delay
TP Pulse
Time Base TB 1 Min (default), 1 s, 100 ms, 10 ms
Preset Value Preset Alamat ini dapat diisi dengan nilai antara 0-9999. nilai pada alamat ini dapat
(%TMi.P) dibaca dan ditulis. Perioda = %TMi.P x TB.

Current Value %TMi.V Alamat ini akan increment dari 0 hingga nilai preset tercapai ketika timer aktif.
Nilai pada alamat ini dapat dibaca tetapi tidak dapat ditulis.
Setting Input IN Timer mulai aktif saat rising edge (TON dan TP) dan falling edge (TOF)
(atau perintah)
Timer Output Q Nilai output ini akan bernilai 1 sesuai dengan fungsi dari jenis timernya.

2 - 37
Contoh Program Timer untuk PLC M221

Timer On Delay dengan preset 5 detik,


diaktifkan oleh Input %I0.0 dan Output Timer di %Q0.0

2 - 38
Counter

 Berfungsi untuk menghitung jumlah perubahan input


 Dapat untuk membatasi banyaknya perubahan input
 Ada dua jenis counter: menghitung naik (up-counter) dan turun (down-
counter)
 Dalam kehidupan sehari-hari terdapat juga counter mekanik dan
elektronik

2 - 39
Instruksi Counter pada PLC M221
Counter Number
1
Input Counter

Output Counter
Counter
Decription
4
2
3

2 - 40
Blok Fungsi Counter
Parameter Label Value
Comment - Comment / Info untuk block Counter
Symbol - Nama block Counter
Counter Number %Ci 0 s/d 255
Preset Value Preset Nilainya diantara 0-9999. nilai alamat ini dapat dibaca dan ditulis.
(%Ci.P)
Current Value %Ci.V Nilai pada alamat ini akan di increment atau decrement tergantung
input dari CU atau CD. Nilai pada alamat ini dapat dibaca tetapi tidak
dapat ditulis.
Reset input (or insturction) R Jika diberi input 1 maka %Ci.V = 0
Set input (or instruction) S Jika diberi input 1 maka %Ci.V = %Ci.P
Upcount input (or instruction) CU Setiap ada input rising edge maka nilai %Ci.V akan di increment
Downcount input (or instruction) CD Setiap ada input rising edge maka nilai %Ci.V akan di decrement
Underflow output E Output akan aktif jika %Ci.V bernilai negatif (%Ci.V sudah bernilai 0 lalu
CD diberi rising edge maka nilai %Ci.V = 9999)
Preset output reached D Output akan bernilai 1 jika dan hanya jika %Ci.V = %Ci,P
Overflow output F Output akan aktif jika %Ci.V bernilai 10000 (%Ci.V sudah bernilai 9999
lalu CU diberi rising edge maka nilai %Ci.V = 0)

2 - 41
Contoh Program Counter pada PLC M221

%I0.0 : Reset Counter %Q0.0 : On ketika 0  9999


%I0.1 : Set %Q0.1 : On ketika %C0.V = 5
%I0.2 : Counter Up %Q0.2 : On ketika 9999  0
%I0.3 : Counter Down

2 - 42
Compare Instruction (1)

• Comparison instruction digunakan untuk membandingkan dua buah


operand
• Tabel di bawah berisi jenis-jenis comparison instruction
Instruction Function

> Test if operant 1 is greater then operant 2

>= Test if operant 1 is greater then or equal operant 2

< Test if operant 1 is less then operant 2

<= Test if operant 1 is less then or equal operant 2

= Test if operant 1 is equal then operant 2

<> Test if operant 1 is different then operant 2

2 - 43
Compare Instruction (2)

Syntax for Comparison instructions


Operand 1 Operator Operand 2
%MWi, %KWi, >, >=, <, <=, =, <> %MWi, %KWi,
%IWx.y, %QWx.y %IWx.y, %QWx.y
%TMi.V, %TMi.P %TMi.V, %TMi.P
%Ci.V, %Ci.P %Ci.V, %Ci.P,
Direct Value

Blok perintah compare akan aktif jika inputnya high. Outputnya akan ON
ketika perintah compare yang diminta bernilai benar.
Block CMP
Input Output

2 - 44
Compare Instruction (3)
• Contoh perintah compare digunakan pada timer dan counter

Output %Q0.0 akan ON ketika Nilai Timer 0 lebih sama dengan 5


Output %Q0.1 akan ON ketika Nilai Counter 1 kurang sama dengan 3

2 - 45

You might also like