Sie sind auf Seite 1von 17

PLC Omron CPM1A

YSF-Rev02-05 III-1
III. PROGRAMMABLE LOGIC CONTROLLER
(PLC) OMRON CPM1A
A. PERANGKAT KERAS
CPM1A adalah salah satu PLC produk OMRON yang banyak digunakan untuk
keperluan sistem kendali otomatis skala kecil hingga sedang. Jajaran tipe
dan perangkat pendukungnya dapat dilihat pada gambar 3.1. Adapun
gambaran konfigurasi perangkat keras untuk CPM1A dapat dilihat pada
gambar 3.2.
Gambar 3.1. PLC CPM1A
The Smallest PLC in the SYSMAC Family
Shows Just How Far Downsizing Can Go
The SYSMAC C Series began developing s wide range of Programmable
Controllers to meet factory automation needs in 1973. And now the CPM1A
joins the C series history as a small PLC that has all the far less mounting
space. The CPM1A also provides flexibility in I/O capacity ranging from 10 to
100 I/O points. The CPM1A can replace relay control, help distribute I/O,
work as a miniature machine controller or sensor controller, or fill many other
vital roles in factory automation.
Flexible Control and Small Body Size
Easy Connection to Programmable Terminals
Windows-Based Support Software
PLC Omron CPM1A
YSF-Rev02-05 III-2
Note: Only 30- and 40-point CPUs support Expansion I/O Units. Up to three Expansion
I/O Units can be connected. Total of from 10 to 100 points.
Gambar 3.2. PLC CPM1A dan modul I/O eksternal
Gambar 3.3. Hubungan PLC CPM1A dengan CX- programmer dan Console
programmer
PLC Omron CPM1A
YSF-Rev02-05 III-3
Gambar 3.4. Hubungan PLC CPM1A dengan NT- programmer
Spesifikasi Teknis:
User Memory : 2,048 words
Data Memory : 1,024 words
Timers/Counters : 128
Basic instructions : 14
Special instructions: 79
Analog adjustment : 2
Execution Time
Basic instructions : 0.64 s
I/O capacity CPU Unit only 10 points 20 points 30 points 40 points, max 100 points
Timers/Counters : 128 timers/counters
External Interrupts : 2 points, 4 points
High-Speed counter
One high-speed counter: 5kHz single-phase or 2.5kHz Two-phase (linear count method)
Incremental mode: 0 to 65535 (16-bit)
Decremental mode: -32767 to 32767 (16bit)
Input bits
00000 tp 00915 (Words 0 to 9)
Output bits
01000 to 01915 (Words 10 to 19)
PLC Omron CPM1A
YSF-Rev02-05 III-4
Work bits (IR Area)
512: IR 20000 to IR 23115 (IR 200 to IR 231)
Special bits (SR Area)
384: SR 23200 to SR 25515 (SR 232 to SR 255)
Supply voltage :
AC power 100 to 240 VAC, 50/60 Hz
DC power 24 VDC
B. PERANGKAT LUNAK
Perangkat lunak yang digunakan pada CPM1A umumnya dapat pula digunakan
pada jenis PLC Omron yang lain. Adapun sebagian daftar set instruksi untuk
perangkat lunak tersebut dapat dilihat pada penjelasan berikut ini:
1). Daftar set instruksi
Ladder Instructions
AND And
AND LD And Load
AND NOT And Not
LD Load
LD NOT Load Not
OR Or
OR LDOr Load
OR NOT Or Not
OUT Output
OUT NOT Output Not
Program Control Instructions
END (01) End
JME (05) Jump End
JMP (04) Jump
NOP (00) No Operation
Bit Control Instructions
DIFU (13) Differentiate Up
DIFD (14) Differentiate Down
KEEP (11) Keep
RSET Reset
SET Set
PLC Omron CPM1A
YSF-Rev02-05 III-5
Timer/Counter Instructions
CNT Counter
CNTR (12) Reversible Counter
CTBL (--) Register Comparison Table
INI (--) Mode Control
PRV (--) High-Speed Counter PV Read
STIM (--) Interval Timer
TIM Timer
TIML (--) Long Timer
TIMH (15) High-Speed Timer
TMHH(--) Very High-Speed Timer
TTIM (87) Totalizing Timer
Data Shifting Instructions
ASFT (--) Asynchronous Shift Register
ASL (25) Arithmetic Shift Left
ASR (26) Arithmetic Shift Right
ROL (27) Rotate Left
ROR (28) Rotate Right
SFT (10) Shift Register
SFTR (84) Reversible Shift Register
SLD (74) One Digit Shift Left
SRD (75) One Digit Shift Right
WSFT (16) Word Shift
RWS (17) Reversible Word Shift
Data Comparison Instructions
BCMP (68) Block Compare
CMP (20) Compare
CMPL (60) Double Compare
CPS (--) Signed Binary Compare
CPSL (--) Double Signed Binary Compare
MCMP (19) Multi-Word Compare
SRCH (--) Data Search
TCMP (85) Table Compare
ZCP (--) Area Range Compare
ZCPL (--) Double Area Range Compare
PID Instructions
PID (--) PID Control
PLC Omron CPM1A
YSF-Rev02-05 III-6
2). Simbol dan Contoh Aplikasi
AND - And
Purpose:
Logically ANDs the status of the designated bit with the current execution condition.
Operand Data Areas:
B: Bit IO, HR, AR, LR, TC
AND NOT - And Not
Purpose:
Logically ANDs the inverse of the designated bit with the current execution condition.
Operand Data Areas:
B: Bit. IO, HR, AR, LR, TC
OUT - Output
Purpose:
Turns ON B for an ON execution condition; turns OFF B for an OFF execution
condition.
Operand Data Areas:
B: Bit IO, AR, HR, TC, LR, TR.
B
B
B
PLC Omron CPM1A
YSF-Rev02-05 III-7
OUT NOT - Output NOT
Purpose:
Turns OFF B for an ON execution condition; turns ON B for an OFF execution
condition.
Operand Data Areas:
B: Bit IO, AR, HR, TC, LR, TR.
END(01) - End
Purpose:
END(01) is required as the last instruction in any program. If there are subroutines,
END(01) is placed after the last subroutine. No instruction written after END(01) will
be executed
B
END (001)
PLC Omron CPM1A
YSF-Rev02-05 III-8
Contoh 1). Pengendali motor listrik Direct-On-Line (DOL)
a). Diagram Ladder
Alternatif 1
Alternatif 2
00000
END (001)
00001 10000
10000
00000
END (001)
00001
10000
10000
PLC Omron CPM1A
YSF-Rev02-05 III-9
b). Mnemonic (Instruction list)
Program alternatif 2, bila ditulis dalam instruction list, sebagai berikut:
Address Instruction Operands
00000 LD 00000
00001 OR 10000
00002 AND NOT 00001
00003 OUT 10000
Catatan :
Implementasi diagram ladder dalam komputer tidak selalu dapat dibuat
secara mudah untuk rangkaian tertentu, hal ini karena keterbatasan
perangkat lunaknya. Jadi diagram ladder yang ditulis pada komputer
harus mengkuti standar perangkat lunak tersebut.
Konversi dari diagram ladder ke Mnemonic (instruction list) harus
diurutkan perintahnya dengan logika yang benar dan mudah, karena untuk
rangkaian tertentu mungkin tidak langsung bisa melakukan konversi.
Untuk kasus tersebut, maka diagram ladder harus terlebih dahulu
dimodifikasi, tanpa mengubah fungsi kerja sistem secara keseluruhan.
TIM - Timer
Purpose:
A timer is activated when its execution condition goes ON and is reset (to SV) when the
execution condition goes OFF. Once activated, TIM measures in units of 0.1 second
from the SV. If the execution condition remains ON long enough for TIM to time down
to zero, the Completion Flag for the TC number used will turn ON and will remain ON
until TIM is reset (that is, until its execution condition goes OFF).
TIM
N
S S : Set Value
N : Timer Number Value
PLC Omron CPM1A
YSF-Rev02-05 III-10
Operand Data Areas:
N: TC Number 000 - 511
SV: Set value (word, BCD) IO, AR, DM, HR, #
TIML(--) - Long Timer
Purpose:
TIML(--) is a decrementing ON-delay timer that times in 1s or 10s units. The timer set
value (SV) can be 0 - 99990s. A long timer is activated when its execution condition
goes ON and is reset (to SV) when the execution condition goes OFF. The timer will
time out when the PV reaches #0000 (0 ms). Once the timer has timed out, the PV and
completion flag status will be maintained. The timer can be resarted by turning its
execution condition OFF and ON again.
When C is value 000, SV BCD values of 0000 - 9999 are valid, giving a range 1s -
9,999s. When C is value 001, SV BCD values of 0000 - 9999 are valid, giving a range
0s - 99,990s
Note
TIML(--) may not be accurate when the cycle time exceeds 1s (for C = 000) or 10s (for
C = 001).
Operand Data Areas:
N: Timer Timer Counter number #0 - #255.
SV: Set Value IR, SR, AR, DM, HR, LR, #
C Control data 000 for 1 second timer, 001 for 10 second timer.
Availability:
CPM2*, CPM2*-S*,
TIMH(15) - High-Speed Timer
TIM (...)
N
SV SV : Set Value
N : Timer Number Value
C C : Control Data
Number Value
TIMH(015)
N
S S : Set Value
N : Timer Number Value
PLC Omron CPM1A
YSF-Rev02-05 III-11
Purpose:
TIMH(15) operates in the same way as TIM except that TIMH measures in units of 0.01
second. The scan time affects TIMH(15) accuracy if TC 016 through TC 511 are used.
If the scan time is greater than 10 ms, use TC 000 through TC 015.
Refer to TIM for further information.
Operand Data Areas:
N: TC number # (000 - 015 Preferred)
S: Set value (word, BCD) IO, AR, DM, HR, #
TMHH(--) - Very High Speed Timer
Purpose:
TMHH(--) is a decrementing ON-delay timer that times in 1ms units. The timer set
value can be 0 - 9.999s. A long timer is activated when its execution condition goes ON
and is reset (to SV) when the execution condition goes OFF. The timer will time out
when the PV reaches #0000 (0 ms). Once the timer has timed out, the PV and
completion flag status will be maintained. The timer can be resarted by turning its
execution condition OFF and ON again.
Note:
Very high speed timers with timer numbers other than TC 004 through TC 007 may not
be accurate when the cycle timer exeeds 1ms.
Operand Data Areas:
N: Timer Timer Counter number #0 - #255.
S: Set Value IR, SR, AR, DM, HR, LR, #
Availability:
CPM2*, CPM2*-S*,
TTIM(87) - Totalizing Timer
TMHH
N
S S : Set Value
N : Timer Number Value
TTIM (087)
N
SV SV : Set Value
N : Timer Number Value
RB RB : Reset BIt
PLC Omron CPM1A
YSF-Rev02-05 III-12
Purpose:
TTIM(87) is used to create a timer that increments the PV every 0.1s to time between
0.1 and 999.9s. TTIM(87) increments in units of 0.1 second from zero. The accuracy
of TTIM(87) is +0.0/-0.1 second.
A TTIM(87) timer will time as long as its execute condition is ON until it reaches the
SV or until RB turns ON to reset the timer.
TTIM(87) timers will time only as long as they are executed every cycle, that is, they do
not time, but maintain the current PV, in interlocked program sections or when they are
jumped in the program.
Operand Data Areas:
N: TC number TTIM 000 through 511
SV: Set Value IO, AR, DM, HR, LR, #
RB: Reset Bit IO, AR, HR, LR
Availability:
C200HS, C200HX and CQM1H Family.
STIM(--) - Interval Timer
Differentiated variant available.
Purpose:
STIM(--) is used to control interval timers by performing four basic functions: starting
the timer for a non-shot interrupt, starting the timer for scheduled interrupts, stopping
the timer and reading the timer's PV.
Set the value of C1 to specify which of these functions will be performed.
Operand Data Areas:
C1: Control data #1 000 - 008, 010 to 012
C2: Control data #2 IO, AR, DM, HR, TC, LR, #
C3: Control data #3 IO, AR, DM, HR, TC, LR, #
Availability:
CPM1, CPM2*, CPM2*-S*, SRM1, SRM1-V2, CQM1, CQM1H and IDSC.
STIM (..)
C1
C2
C3
PLC Omron CPM1A
YSF-Rev02-05 III-13
CNT - Counter
Variations: None
Purpose:
CNT is used to count down from SV when the execution condition on the count pulse,
CP, goes from OFF to ON, that is, the present value (PV) will be decremented by one
whenever CNT is executed with an ON execution condition for CP and the execution
condition was OFF for the last execution. If the execution condition has not changed or
has changed from ON to OFF, the PV of CNT will not be changed. The Completion
Flag for a counter is turned ON when the PV reaches zero and will remain ON until the
counter is reset.
CNT is reset with a reset input, R. When R goes from OFF to ON, the PV is reset to
SV. The PV will not be decremented while R is ON. Counting down from SV will
begin again when R goes OFF. The PV for CNT will not be reset in interlocked
program sections or by power interruptions.
Operand Data Areas:
N: TC Number 000 - 511
SV: Set value (word, BCD) IO, AR, DM, HR, #
CNTR(12) - Reversible Counter
Purpose:
The CNTR(12) is a reversible, up/down circular counter, that is, it is used to count
between zero and SV according to changes in two execution conditions, those in the
increment input (II) and those in the decrement input (DI).
CNT
N
SV S : Set Value
N : Counter Number
Value
Counter input
Reset input
CNTR(012)
N
SV SV : Set Value
N : Counter Number
Value
Increament input
Reset input
Decreament input
PLC Omron CPM1A
YSF-Rev02-05 III-14
`The present value (PV)* will be incremented by one whenever CNTR(12) is executed
with an ON execution condition for II and the last execution condition for II was OFF.
The present value (PV) will be decremented by one whenever CNTR(12) is executed
with an ON execution condition for DI and the last execution condition for DI was OFF.
If OFF to ON changes have occurred in both II and DI since the last execution, the PV
will not be changed.
If the execution conditions have not changed or have changed from ON to OFF for both
II and DI, the PV of CNT will not be changed.
When decremented from 0000, the present value is set to SV and the Completion Flag is
turned ON until the PV is decremented again. When incremented past the SV, the PV is
set to 0000 and the Completion Flag is turned ON until the PV is incremented again.
CNTR(12) is reset with a reset input, R. When R goes from OFF to ON, the PV is reset
to zero. The PV will not be incremented or decremented while R is ON. Counting will
begin again when R goes OFF. The PV for CNTR(12) will not be reset in interlocked
program sections or by the effects of power interruptions.
*Note: TC is dependent on PLC type.
Operand Data Areas:
N: TC Number 000 - 511
SV: Set value (word, BCD) IO, AR, DM, HR, LR, #
Availability:
C200H, C200HS, CPM1, CPM2*, CPM2*-S*, SRM1, SRM1-V2, CQM1, CQM1H,
C1000H, C2000H, IDSC and C200HX Family
CTBL(--) - Register Comparison Table
Variations:
Differentiated variant available.
Purpose:
Registers a comparison table for use with the high-speed counter PV. Depending on the
value of C, comparison with the high-speed counter PV can begin immediately or it can
be started separately with INI(--).
The port specifier (P) specifies the high-speed counter that will be used in the
comparison.
Operand Data Areas:
P: Port specifier 000, 001 or 002; by CQM1H-CTB41: for slot 1 - 000 to
004, for slot 2 - 101 to 104
C: Control data 000 to 003
CTBL (..)
P
C
TB
PLC Omron CPM1A
YSF-Rev02-05 III-15
TB: 1st comparison table word IO, AR, DM, HR, LR
Availability:
CPM1, CPM2*, CPM2*-S*, SRM1, SRM1-V2, CQM1, CQM1H and IDSC.
PRV(--) - High-Speed Counter PV Read
Variations:
Differentiated variant available.
Purpose:
Reads data specified by P and C and writes it to D or D and D+1.
The port specifier (P) specifies the high-speed counter or pulse output.
The control data, C, determines which type of data will be accessed.
Operand Data Areas:
P: Sport specifier 000 to 002 (000 to 002, 100 to 103 for CPM2*)
C: Control data 000 to 003
D: 1st destination word IO, AR, DM, HR, LR
Availability:
CPM1, CPM2*, CPM2*-S*, SRM1, CQM1, CQM1H and IDSC.
PID(--) - PID Control
Variations:
Differentiated variant available.
Purpose:
PRV (..)
P
C
D
PIDD (..)
S
C
D
PLC Omron CPM1A
YSF-Rev02-05 III-16
PID(--) performs PID control based on the parameters specified in C through C+6 (with
a work area of C+7 to C+32). The data in S is used to calculate the output data that is
written to D.
Operand Data Areas:
S: Input data word IO, AR, DM, HR, LR
C: 1st parameter word IO, DM, HR, LR
D: Output data word O, AR, DM, HR, LR
Availability:
C200HS, CPM2*, CPM2*-S*, SRM-V2, CQM1 (CPU4x only), CQM1H and C200HX
Family
On C200HX Family (CPUxx_Z CPUs only), this function is also available in a 3-digit
format as PID(190).
DIFU(13) - Differentiate Up
Purpose:
DIFU(13) turns ON the designated bit (B) for one scan on reception of the leading
(rising) edge of the input signal.
Operand Data Areas:
B: Bit IO, AR, HR, LR.
DIFD(14) - Differentiate Down
Purpose:
DIFD(14) turns ON the designated bit (B) for one scan on reception of the trailing
(falling) edge of the input signal.
Operand Data Areas:
B: Bit IO, AR, HR, LR.
DIFU(013)
B B : Bit
DIFD(014)
B B : Bit
PLC Omron CPM1A
YSF-Rev02-05 III-17
RSET - Reset
Purpose:
Turns OFF B for an ON execution condition; does not affect B for an OFF execution
condition.
Operand Data Areas: B: Bit IO, AR, HR, LR.
Availability:
C200HS, CPM1, CPM2*, CPM2*-S*, SRM1, SRM1-V2, CQM1, CQM1H, IDSC
andC200HX Family.
SET - Set
Purpose:
Turns ON B for an ON execution condition; does not affect B for an OFF execution
condition.
Operand Data Areas:
B: Bit IO, AR, HR, LR.
Availability:
C200HS, CPM1, CPM2*, CPM2*-S*, SRM1, SRM1-V2, CQM1, CQM1H and IDSC
and C200HX Family.
Catatan :
Cara pembuatan program dapat dilihat pada bab 4 dan bila digunakan CX-
programmer dapat dilihat pada help-file/document.
RSET
B B : Bit
SET
B B : Bit