361
SECTION 7
Instruction Set
The CPM1, CPM1A, CPM2A, CPM2C (including the CPM2C-S), and SRM1(-V2) PCs 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.
7-1
Notation
364
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-2
Instruction Format
364
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-3
Data Areas, Definer Values, and Flags
364
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-4
Differentiated Instructions
366
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-5
Coding Right-hand Instructions
367
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-6
Instruction Tables
370
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-6-1
CPM1/CPM1A Function Codes
370
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-6-2
CPM2A/CPM2C Function Codes
371
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-6-3
SRM1(-V2) Function Codes
372
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-6-4
Alphabetic List by Mnemonic
373
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-7
Ladder Diagram Instructions
376
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-7-1
LOAD, LOAD NOT, AND, AND NOT, OR, and OR NOT
376
. . . . . . . . . . . . . . . . .
7-7-2
AND LOAD and OR LOAD
377
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-8
Bit Control Instructions
377
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-8-1
OUTPUT and OUTPUT NOT – OUT and OUT NOT
377
. . . . . . . . . . . . . . . . . . . . .
7-8-2
SET and RESET – SET and RSET
378
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-8-3
KEEP – KEEP(11)
379
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-8-4
DIFFERENTIATE UP and DOWN – DIFU(13) and DIFD(14)
380
. . . . . . . . . . . . . .
7-9
NO OPERATION – NOP(00)
381
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-10 END – END(01)
381
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-11 INTERLOCK and INTERLOCK CLEAR – IL(02) and ILC(03)
381
. . . . . . . . . . . . . . . . . . . .
7-12 JUMP and JUMP END – JMP(04) and JME(05)
383
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-13 User Error Instructions:
FAILURE ALARM AND RESET – FAL(06) and
SEVERE FAILURE ALARM – FALS(07)
385
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-14 Step Instructions:
STEP DEFINE and STEP START–STEP(08)/SNXT(09)
385
. . . . . . . . . . . . . . . . . . . . . . . . . .
7-15 Timer and Counter Instructions
388
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-15-1
TIMER – TIM
389
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-15-2
HIGH-SPEED TIMER – TIMH(15)
390
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-15-3
VERY HIGH-SPEED TIMER: TMHH(––)
391
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-15-4
LONG TIMER: TIML(––)
392
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-15-5
COUNTER – CNT
394
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-15-6
REVERSIBLE COUNTER – CNTR(12)
395
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-15-7
REGISTER COMPARISON TABLE – CTBL(63)
396
. . . . . . . . . . . . . . . . . . . . . . . .
7-15-8
MODE CONTROL – INI(61)
399
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7-15-9
HIGH-SPEED COUNTER PV READ – PRV(62)
401
. . . . . . . . . . . . . . . . . . . . . . . .