Instruction Set - Omron CPM1 Programming Manual

Hide thumbs Also See for CPM1:
Table of Contents

Advertisement

The CQM1 and CPM1 have large programming instruction sets that allow for easy programming of complicated control
processes. This section explains instructions individually and provides the ladder diagram symbol, data areas, and flags
used with each.
The many instructions provided by these PCs are organized in the following subsections by instruction group. These groups
include Ladder Diagram Instructions, instructions with fixed function codes, and set instructions.
Some instructions, such as Timer and Counter instructions, are used to control execution of other instructions, e.g., a TIM
Completion Flag might be used to turn ON a bit when the time period set for the timer has expired. Although these other
instructions are often used to control output bits through the Output instruction, they can be used to control execution of
other instructions as well. The Output instructions used in examples in this manual can therefore generally be replaced by
other instructions to modify the program for specific applications other than controlling output bits directly.
5-1
Notation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-2
Instruction Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-3
Data Areas, Definer Values, and Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-4
Differentiated Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-5
Coding Right-hand Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-6
Instruction Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-6-1
CQM1 Function Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-6-2
CPM1/CPM1A Function Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-6-3
SRM1 Function Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-6-4
Alphabetic List by Mnemonic . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-7
Ladder Diagram Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-7-1
5-7-2
AND LOAD and OR LOAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-8
Bit Control Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-8-1
5-8-2
SET and RESET - SET and RSET. . . . . . . . . . . . . . . . . . . . . . . . . .
5-8-3
KEEP - KEEP(11) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-8-4
5-9
NO OPERATION - NOP(00) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-10 END - END(01) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-12 JUMP and JUMP END - JMP(04) and JME(05) . . . . . . . . . . . . . . . . . . . . . .
SEVERE FAILURE ALARM - FALS(07) . . . . . . . . . . . . . . . . . . . . . . . . . .
STEP DEFINE and STEP START-STEP(08)/SNXT(09) . . . . . . . . . . . . . . .
5-15 Timer and Counter Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-15-1 TIMER - TIM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-15-2 COUNTER - CNT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-15-3 REVERSIBLE COUNTER - CNTR(12). . . . . . . . . . . . . . . . . . . . .
5-15-4 HIGH-SPEED TIMER - TIMH(15) . . . . . . . . . . . . . . . . . . . . . . . .
5-15-5 INTERVAL TIMER - STIM(69) . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-15-7 MODE CONTROL - INI(61). . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-16 Shift Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-16-1 SHIFT REGISTER - SFT(10) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-16-2 WORD SHIFT - WSFT(16). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5-16-3 ARITHMETIC SHIFT LEFT - ASL(25). . . . . . . . . . . . . . . . . . . . .
5-16-4 ARITHMETIC SHIFT RIGHT - ASR(26) . . . . . . . . . . . . . . . . . . .
5-16-5 ROTATE LEFT - ROL(27). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SECTION 5

Instruction Set

188
188
188
190
191
194
194
195
196
197
200
200
201
201
201
202
203
204
205
205
205
207
209
210
212
213
214
216
217
218
220
225
227
229
229
230
230
231
231
185

Advertisement

Table of Contents
loading

Table of Contents