Basic PLC
Basic PLC
M262
M580
M251 Quantum
M241
M340
Premium
M221
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 :
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
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
Slot Micro SD
2 - 18
Program Error Viewers
2 - 19
Program Error Viewers
Viewers Keterangan
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
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
2 - 25
Machine Expert Basic – M221 (5)
• Media for Download / Upload program
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
2 - 34
Jenis Timer
TON
TP
TOF
1
Comment, Symbol, Timer Number
2
4
Timer Description
2 - 36
Blok Fungsi Timer
Parameter Label Value
Comment - Comment / Info untuk block Timer
Symbol - Nama block Timer
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
2 - 38
Counter
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
2 - 42
Compare Instruction (1)
2 - 43
Compare Instruction (2)
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
2 - 45