Professional Documents
Culture Documents
Overview of Instructions
The CPM1A has a large selection of programming instructions that allows for
easy programming of complicated control processes. The instructions
explained in this section includes ladder diagram symbols and the
mnemonic codes for the instructions. Application examples are also
provided.
OR allows points
to be Displays the
OR SFT
Connected operations
together, to of the SHIFT
SHIFT is used to
OUT The SHIF obtain the
OUTput T Alternate function of
command the
A Four keys with more
than
The TIMers 0
TIM are
control using Used to input
this
0
decimal or
hexadecimal
The COUNTers numbers when
CNT are 9
controled
using this
6-1
6. APPLICATION EXAMPLES OF BASIC COMMANDS
Circuit Diagram
START
STO
P
INPUT
OUTPUT
MC
Load Power
Supply
6-2
6. APPLICATION EXAMPLES OF BASIC COMMANDS
Note: This program enables the output 01000 to stay “ON” despite the status of
the input 00000 which triggered it. This is often desirable in continuous
output operations which begin with only an instantaneous ON input.
LD A
2. CLR 2. 0 WRITE
A A
B A
1 0
3. 0 0 WRITE
OR
1 0 0B 0
1
4. AND NOT WRITE
1
B A A A
1 0 0 0
5. OUT WRITE
1 0 0 0
A B
0 1
6. FUN WRITE
0 1
Note: All instructions will only be stored in the PLC memory after the WRITE key
is pressed and every program must have an END (FUN 01) instruction. All
examples given in this manual will follow the same procedure of entry and
henceforth the program entry procedure will not be mention again.
6-3
6. APPLICATION EXAMPLES OF BASIC COMMANDS
0002 READ
AND NOT
0001
0004 READ
END(01)
(0.01KW)
To execute the program that has stored in the PLC, set the Mode Selector
switch to RUN or MONITOR mode.
• RECALLING A PROGRAM
CLR OUT
CLR
B A A A
1 0 0 0
SRC 0003 SRCH
H OUT
1 0 0 0 01000
This confirms the OUT 01000 instruction has been written into the PLC
memory address 00003.
Note: If the above operations are performed during MONITOR or RUN mode, the
state of each address can be monitored.
6-4
6. APPLICATION EXAMPLES OF BASIC COMMANDS
Program Organisation
0000 000 0000 0000 0000 0000
0 01 2 3 4 5 1000
0100 0100 0
0 1 0000
6
0020
0 6-5
6. APPLICATION EXAMPLES OF BASIC COMMANDS
0000 000
[a]
0 01
[e] 000 0000
04 5
010 0100
[b] 00 1 [d] 000 0000
02 3
[f] 0000 5
1 6
002
[c]
00
3 4
2
(2) Program each block from top to bottom, then from left to right
AND 0002 OR
AND NOT 0003 0006
AND
LD
0020
0
OUT
10000
Review Questions
Convert the ladder diagram given below to its equivalent mnemonic codes.
6-6
6. APPLICATION EXAMPLES OF BASIC COMMANDS
0000 0000
4 5
0000 0000
6 7
6-7
6. APPLICATION EXAMPLES OF BASIC COMMANDS
Simply TURN-ON input manually. Input indicator will show functionality of
device.
Forced Set/Reset
Forcing outputs or other parts of the program ON or OFF irrespective to the
Program is referred to as FORCED SET/RESET.
A B A A A
CLR OUT
Press 0 1 0 0 0
PLAY
MONTR
SET
Program Search
6-8
6. APPLICATION EXAMPLES OF BASIC COMMANDS
The program can be searched for occurrences of any designated instruction
or data area bit address used in instruction. Searches can be performed
from any currently displayed address or from a cleared display.
<Instruction>
CONT
CLR SHIFT <Address> SRCH SRCH
#
HR
TIM
CNT
CONT F
SHIFT 0000
# 5 CONT
00005
0000
• Example: CLR
Instruction Searches
LD 0000
LD
00000
SRCH 0202
LD
00000
CLR 0000
B A A 0100
1 0 0
B 0100
1 TIM
001
6-10
6. APPLICATION EXAMPLES OF BASIC COMMANDS
In PROGRAM mode, any instruction that is currently displayed can be
deleted or another instruction can be inserted before it. These are not
possible in RUN or MONITOR modes.
To insert an instruction, display the instruction before which you want the
new instruction to be placed, input the instruction in the same way as when
inputting a program initially, and then press INS and the DOWN key.
<Instruction> INS
\E <Instruction
currently
displayed>
6-11