ElectronicsI nstrumentation& PLC (DKT 314) LaboratoryModule

UNIVERSITI MALAYSIA PERLIS – Exp1
1
EXPERIMENT 1
INTRODUCTION TO OMRON CPM1A
OBJECTIVES
1. To familiarized with types of PLC available in market
2. To learn a simple steps to use Programming Console to program PLC
3. To learn about OMRON CPMIA memory structure
4. To understand I/O port addressing in OMRON CPMIA PLC
INTRODUCTION
OMRON CPM1A
1. There are 4 types of PLC from CPMIA family that differs from its number of I/O:
a) 10 I/O ports (expansion not possible)
b) 20 I/O ports (expansion not possible)
c) 30 I/O ports (with expansion port)
d) 40 I/O ports (with expansion port)
2. In each category above, there are two categories of them again; using AC power
supply & DC power supply for the central processing unit (CPU).
3. Like other family, CPMIAs are programmable via two ways:
a. Programming console (CQMI-PROOI-E)
b. PC by using CX-Programmer (through RS-232C adapter)
Figure 1.1 Connection diagram between OMRON CPM1A & Programming Console
ElectronicsI nstrumentation& PLC (DKT 314) LaboratoryModule
UNIVERSITI MALAYSIA PERLIS – Exp1
2
Figure 1.2 Connection Diagram between OMRON CPM1A & PC
4. In this lab, we will use CPMIA-20CDR-A-Vl, that have 20 I/O (12 input terminals
& 8 output terminals) with AC power input for the CPU.
5. This PLC comes with Programming Console CQM1-PRO01-E for programming
and RS-232C adapter (CPM1-CIF01) to communicate with PC. The PLC was
packaged inside Training Kit that occupy 2 modes of usage LAMP or SOCKET.
6. If the mode is selected to LAMP, all the 12 red switches and 8 lamps will be
functional for training & demonstration purposes whereas in SOCKET mode, all
the 12 input ports & 8 output ports on the Training Kit are activated and ready to
connect to the I/O peripherals such as switch, coil, lamp, or even 7 segment
display.
PROGRAMMING CONSOLE CQM1-PRO01-E
Figure 1.3 Programming Console CQM1-PRO01-E
ElectronicsI nstrumentation& PLC (DKT 314) LaboratoryModule
UNIVERSITI MALAYSIA PERLIS – Exp1
3
1. Programming Console is the best solution for onsite application such as start up
and adjustments where PC contribution is nearly impossible.
2. Usually used by technicians to start or stop certain operation in production line or
to modify data that doesn't involve directly in main program.
3. Have 3 modes of operation (selectable using key provided):
a. Run - use to execute the program that has been entered into the PLC. No
changes can be made to the internal data in this mode.
b. Monitor - use when changing the contents of memory areas while the
PLC is actually in operation.
c. Program - for preparing program/modifications/corrections to existing
program.
OMRON CPM1A MEMORY AREA STRUCTURE
1. Like other programmable devices such as microprocessors and microcontrollers,
PLC has its own memory area that takes part in data processing from bit
manipulations to I/O activities.
2. These memory areas were determined by manufacturer and it is standard for all
OMRON PLC in certain family such as CPM1A and CPM2A.
3. Every component in Ladder Diagram must have its own address so that there will be
no errors thrown by PLC while compiling the program written.
4. In Table 2, these memory areas are described in detail for usage in program
development.
Data Area Words Bits Function
Input area 000 to 009 00000 to 00915
These bits can be allocated to the
external
(10 words) (160 bits) I/O terminals.
Output area 010 to 019 01000 to 01915
(10 words) (160 bits)
Work area IR 200 to IR 231
IR 20000 to IR
23115
Work bits can be freely used within
the
(IR area) (32 words) (512 bits) program.
SR area SR 232 to SR 255 SR 23200 to SR
These bits serve specific functions
such as
ElectronicsI nstrumentation& PLC (DKT 314) LaboratoryModule
UNIVERSITI MALAYSIA PERLIS – Exp1
4
(24 words) 25515 flags and control bits.
(384 bits)
TR area - - - TR 0 to TR 7
These bits are used to temporarily
store
(8 bits) ON/OFF status at program branches.
HR area HR 00 to HR 19 HR 0000 to HR 1915 These bits store data and retain their
(20 words) (320 bits)
ON/OFF status when power is turned
off.
AR area AR 00 to HR 15 AR 0000 to HR 1515
These bits serve specific functions
such as
(16 words) (256 bits) flags and control bits.
LR area LR 00 to LR 15 LR 00000 to LR1515
Used for a 1: 1 data link with another
Pc.
(16 words) (256 bits)
Timer/Counter area TC 000 to TC 127 (timer/counter numbers) The same numbers are used for both
timers and counters.
DM Read/write DM 0000 to DM 0999 - - -
DM area data can be accessed in
word
area DM 1022 to DM 1023
units only. Word values are retained
when
(1,002 words) the power is turned off.
Error log DM 1000 to DM 1021 - - -
Used to store the time of occurrence
and
(22 words) error code of errors that occur. These
words can be used as ordinary
read/write
DM when the error log function isn't
being used.
Read-only DM 6144 to DM 6599 - . - Cannot be overwritten from program.
(456 words)
Table 1.1 CPM1A Memory Areas
ElectronicsI nstrumentation& PLC (DKT 314) LaboratoryModule
UNIVERSITI MALAYSIA PERLIS – Exp1
5
I/O PORT ADDRESS
1. For OMRON PLC, the conventional used for I/O addressing is based on per channel
where each channel size is 16 bits (1 word). Each bit was mapped exclusively for
each port accordingly.
2. From Table 2, there are 10 channels (or words) used for input and 10 channels for
output. All input and output devices connected to the PLC must be assigned with
PLC address, correspond to PLC internal memory Input Bit and Output Bit.
3. PLC addressing comprises of Channel and Bit. Each Channel consists of 16 bits,
indicated as "00, 01, 02, 03 ... up to 15" in the addressing.
4. I/O port addressing is illustrated in Figure 12. Note that, usually the "." is omitted for
simplification.
Figure 1.4 PLC I/O Address
5. In our case, where 12 inputs and 8 outputs involve, the addressing are shown in
Table 1.2.
6. Note that for input and output channel, only channel 000 (input) and 010 (output) will
be used since our PLC used for this lab only have 12 input ports and 8 output ports.
The remaining channels are reserved for other models that have greater number of
I/O.
ElectronicsI nstrumentation& PLC (DKT 314) LaboratoryModule
UNIVERSITI MALAYSIA PERLIS – Exp1
6
Table 1.2 I/O Addressing
PROGRAMMING STEPS
STARTING UP
1. After plugging in the Programming Console at the PLC, switch on the power supply.
2. To gain access to the PC's programming functions, you must first enter the
password. The password prevents unauthorized access to the program.
3. The PLC prompts you for a password when PLC power is turned on or, if PLC power
is already on, after the Programming Console has been connected to the PC. To
gain access to the system when the "Password!" message appears, press CLR
and then MONTR. Then press CLR to clear the display.
4. Once the Programming Console has been connected, its mode selector can be used
to change the PLC operating mode. The mode display (<PROGRAM>, <MONITOR>,
or <RUN>) will appear on the Programming Console screen.
5. Press CLR to clear the display so that key operations can be performed.
ElectronicsI nstrumentation& PLC (DKT 314) LaboratoryModule
UNIVERSITI MALAYSIA PERLIS – Exp1
7
Figure 1.5 PLC Mode Selection
CLEARING MEMORY
1. This operation is used to clear all of memory, including the user program, PC Setup
and all data areas. This process should be executed only in Program Mode.
2. Before beginning to program for the first time or when installing a new program, all
memory areas needs to be cleared.
RUN MONITOR PROGRAM
No No OK
3. To begin,
a. Press CLR key to bring up the initial display.
b. Press the SET, NOT and then the RESET Key to begin the operation.
c. Press the MONTR Key to clear memory.
ElectronicsI nstrumentation& PLC (DKT 314) LaboratoryModule
UNIVERSITI MALAYSIA PERLIS – Exp1
8
ENTERING NEW PROGRAM
1. This operation is used to enter or edit programs. It is possible in PROGRAM mode
only.
RUN MONITOR PROGRAM
No No OK
2. The same procedure is used to either input a program for the first time or to change a
program that already exists. In either case, the current content of Program Memory is
overwritten.
3. The program shown in the following diagram will be entered to demonstrate this
operation.
a. Press the CLR Key to bring up the initial display. Note that the 00000 is the
address location of the program.
b. Specify the address where the program will begin.
c. Input the address where the program will begin and press the Down Arrow
Key. It is not necessary to input leading zeroes.
Note: It is a good habit to start a new program at address 00000 to prevent any problem
and difficulties in troubleshooting.
ElectronicsI nstrumentation& PLC (DKT 314) LaboratoryModule
UNIVERSITI MALAYSIA PERLIS – Exp1
9
d. Input the first instruction and operand.
e. Press the WRITE Key to write the instruction to Program Memory. The next
program address will be displayed.
If a mistake was made inputting the instruction, press the Up Arrow Key to
return to the previous program address and input the instruction again. The
mistaken instruction will be overwritten.
f. Press AND + 3 + WRITE for the next instruction.
g. Press AND + 4 + WRITE for the next instruction.
h. Press OUT + 1000 + WRITE for output.
i. To put an END, press FUN + 01 + WRITE.
CHECKING MEMORY STATUS
1. This operation is used to check bits ON or OFF and is useful when debugging
the program or checking input/output wiring. It is possible in MONITOR or
PROGRAM mode only.
RUN MONITOR PROGRAM
No OK OK
2. The steps are:
a. Press CLR Key to bring up the initial display, 00000.
b. Press SHIFT + CONT + <ADDRESS> + MONTR. The address is the
memory location that needs to be checked. For example, to check the
memory location of 00001, the input 1.
c. The status of the input switch (in this case) is shown as ON if the switch is
on and shown as OFF if the switch is off.
ElectronicsI nstrumentation& PLC (DKT 314) LaboratoryModule
UNIVERSITI MALAYSIA PERLIS – Exp1
10
FORCE SET, FORCE RESET
1. This operation is used to force bits ON (force set) or OFF (force reset) and is useful
when debugging the program or checking output wiring. It is possible in MONITOR or
PROGRAM mode only.
RUN MONITOR PROGRAM
No OK OK
2. The steps are:
a. Press CLR Key to bring up the initial display, 00000.
b. Press SHIFT + CONT + <ADDRESS> + MONTR. The address is the memory
location that needs to be force set or reset. For example, to check the memory
location of 01001, output 1. This step is same with the checking memory status
in the previous section.
c. The status of the input switch (in this case) is shown as ON if the switch is on
and shown as OFF if the switch is off.
d. To force set, press SET, to force reset, press RESET.
e. If the memory location is an output, the lamp at the PLC will turned on when it is
force set and off when it is force reset. Otherwise, if the memory location is not
input or output, this steps only put 1 (hi) at the memory location if force set, and
put 0 (10) when force reset.
ElectronicsI nstrumentation& PLC (DKT 314) LaboratoryModule
UNIVERSITI MALAYSIA PERLIS – Exp1
11
TIMER
1. CPMIA have 128 timers/counters that can be used for any applications.
2. Below is the basic Ladder Diagram for timer to trigger an output after 8 seconds of
activation.
Figure 1.6 Switching an Output after 8 Seconds
ElectronicsI nstrumentation& PLC (DKT 314) LaboratoryModule
UNIVERSITI MALAYSIA PERLIS – Exp1
12
COUNTER
1. CPM1A have 128 timers/counters that can be used for any applications.
2. Below is the basic Ladder Diagram for counter (10 times).
ElectronicsI nstrumentation& PLC (DKT 314) LaboratoryModule
UNIVERSITI MALAYSIA PERLIS – Exp1
13
Name: _______________________________ Matrix No: ____________________
Date: ________________
LAB EXERCISES:
1. Differentiate Run, Monitor and Program Mode in the PLC used in the lab.
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
…………………………………………….
2. Give addresses for input and output for the PLC used in the lab.
………………………………………………………………………………………………………
………………………………………………………………………………………………………
…………………………………………………..
3. Give range of addresses for timer/counter.
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………….
Instructor Approval: ……………………………. Date: ……………
ElectronicsI nstrumentation& PLC (DKT 314) LaboratoryModule
UNIVERSITI MALAYSIA PERLIS – Exp1
14
Name: _______________________________ Matrix No: ____________________
Date: ________________
LAB TASKS:
1. Program the PLC by using the Programming Console with the following program
Address Instruction Operands
00000 LD 00001
00001 AND 00012
00002 AND 00004
00003 OUT 01000
00004 END
a) How to make the output 01000 on?
………………………………………………………………………………………………………
………………………………………………………………………………………………………
…………………………………………………..
b) Change the address 00001 from AND 00012 to AND 20000, how to make the output
01000 on? How to make the output off?
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
…………………………………………….
c) Give difference when using 00012 as input as compared to 20000
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………..
Instructor Approval: ……………………………. Date: ……………
ElectronicsI nstrumentation& PLC (DKT 314) LaboratoryModule
UNIVERSITI MALAYSIA PERLIS – Exp1
15
Question
1. Diagram in Figure 1.7 shows that PLC connection to control the traffic light. The
red light will turn ‘ON’ when the system in standby mode. Upon the START
button is pressed, the traffic light will operate in following sequence in Figure 1.7
Design a ladder diagram to perform the traffic light operation.
Figure 1.7

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.