EasyManuals Logo

Omron CPM1 Programming Manual

Omron CPM1
541 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #134 background imageLoading...
Page #134 background image
113
Calculating with Signed Binary Data Section 1-10
1-10 Calculating with Signed Binary Data
The CQM1/CPM1/CPM1A/SRM1 allow calculations on signed binary data.
The following instructions manipulate signed binary data. Signed data is han-
dled using 2’s complements.
CQM1 Instructions The following signed-binary instructions are available in CQM1 PCs:
Single-word Instructions
2’S COMPLEMENT – NEG(––)
BINARY ADD – ADB(50)
BINARY SUBTRACT – SBB(51)
SIGNED BINARY MULTIPLY – MBS(––)
SIGNED BINARY DIVIDE – DBS(––)
Double-word (Long) Instructions
DOUBLE 2’S COMPLEMENT – NEGL(––)
DOUBLE BINARY ADD – ADBL(––)
DOUBLE BINARY SUBTRACT – SBBL(––)
DOUBLE SIGNED BINARY MULTIPLY – MBSL(––)
DOUBLE SIGNED BINARY DIVIDE – DBSL(––)
CPM1/CPM1A/SRM1
Instructions
The following signed-binary instructions are available in CPM1/CPM1A/SRM1
PCs:
BINARY ADD – ADB(50)
BINARY SUBTRACT – SBB(51)
Signed Data Calculations
1-10-1 Definition of Signed Binary Data
The CQM1 provides instructions that operate on either one or two words of
data; the CPM1/CPM1A/SRM1 provide just two instructions that operate on
one word of data. Signed binary data is manipulated using 2’s complements
and the MSB of the one- or two-word data is used as the sign bit. The range of
data that can be expressed using one or two words is thus as follows:
One-word data:
–32,768 to 32,767 (8000 to 7FFF hexadecimal)
Two-word data:
–2,147,483,648 to 2,147,483,647 (8000 0000 to 7FFF FFFF hexadeci-
mal)
Addition
7 + 3 = 10
(–7) + 3 = –4
7 + (–3) = 4
(–7) + (–3) = –10
Multiplication
7 × 3 = 21
(–7) × 3 = –21
7 × (–3) = –21
(–7) × (–3) = 21
Subtraction
7 – 3 = 4
(–7) – 3 = –10
7 – (–3) = 10
(–7) – (–3) = –4
Division
7 ÷ 3 = 2 with a remainder of 1
(–7) ÷ 3 = –2 with a remainder of –1
7 ÷ (–3) = –2 with a remainder of 1
(–7) ÷ (–3) = 2 with a remainder of –1

Table of Contents

Other manuals for Omron CPM1

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CPM1 and is the answer not in the manual?

Omron CPM1 Specifications

General IconGeneral
ModelCPM1
ManufacturerOmron
Instruction SetBasic and advanced instructions
Power Supply100 to 240 VAC or 24 VDC
CommunicationRS-232C
I/O Points10, 20, 30, or 40 points depending on the model
TimersYes, multiple timers available
CountersYes, multiple counters available
Input Voltage24V DC
Output TypeRelay or transistor
Number of I/O Points10, 20, 30, 40
Communication PortsRS-232C (optional)
Operating Temperature0°C to 55°C
Storage Temperature-20°C
Humidity10% to 90% (non-condensing)
DimensionsVaries depending on the model
WeightVaries depending on the model
Program Memory2048 steps (2K steps)

Related product manuals