Logic Instructions - Omron CPM1 - PROGRAMING MANUAL 02-2001 Programming Manual

Hide thumbs Also See for CPM1 - PROGRAMING MANUAL 02-2001:
Table of Contents

Advertisement

Logic Instructions

Data Type
Flags
Example
00001
7-24 Logic Instructions
7-24-1 COMPLEMENT – COM(29)
Limitations
Description
The bytes will be added in this order when bit 12 is OFF: 1+2+3+4....
The bytes will be added in this order when bit 12 is ON: 2+3+4....
Data within the range is treated as unsigned binary when bit 14 of C is ON and bit
15 is OFF, and it is treated as signed binary when both bits 14 and 15 are ON.
Data within the range is treated as BCD when bit 14 of C is OFF, regardless of the
status of bit 15.
Indirectly addressed DM word is non-existent. (Content of *DM word is
ER:
not BCD, or the DM area boundary has been exceeded.)
R
and R
+N–1 are not in the same data area.
1
1
The number of items in C is not BCD between 001 and 999.
The data being summed in not BCD when BCD was designated.
EQ:
ON when the result is zero.
In the following example, the BCD contents of the 8 words from DM 0000 to
DM 0007 are added when IR 00001 is ON and the result is written to DM 0010
and DM 0011.
@SUM(––)
#0008
DM 0000
DM 0010
DM 0000
DM 0001
DM 0002
DM 0003
DM 0004
DM 0005
DM 0006
DM 0007
Ladder Symbols
COM(29)
@COM(29)
Wd
DM 6144 to DM 6655 cannot be used for Wd.
When the execution condition is OFF, COM(29) is not executed. When the
execution condition is ON, COM(29) clears all ON bits and sets all OFF bits in
Wd.
Address Instruction
00000
LD
00001
@SUM(––)
0001
0002
0003
0004
0005
0006
0007
0008
Wd
Section
7-24
Operands
00001
#
0008
DM
0000
DM
0010
DM 0010
0036
DM 0011
0000
Operand Data Areas
Wd: Complement word
IR, SR, AR, DM, HR, LR
479

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CPM1 - PROGRAMING MANUAL 02-2001 and is the answer not in the manual?

Questions and answers

Table of Contents