EasyManuals Logo
Home>Omron>Controller>CPM1

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 #136 background imageLoading...
Page #136 background image
115
Calculating with Signed Binary Data Section 1-10
1-10-2 Arithmetic Flags
The results of executing signed binary instructions is reflected in the arith-
metic flags. The flags and the conditions under which it will turn ON are given
in the following table. The flags will be OFF when these conditions are not
met.
1-10-3 Inputting Signed Binary Data Using Decimal Values
Although calculations for signed binary data use hexadecimal expressions,
inputs from the Programming Console or SSS can be done using decimal
inputs and mnemonics for the instructions. The procedure to using the Pro-
gramming Console to input using decimal values is shown in the CQM1 Oper-
ation Manual, CPM1 Operation Manual, CPM1A Operation Manual and SRM1
Master Control Unit Operation Manual. Refer to the SSS Operation Manual:
C-series PCs for details on using the SSS.
Input Instructions Only 16-bit operands can be input for the following instructions: NEG(––),
ADB(50), SBB(51), MBS(––), and DBS(––). Refer to the CQM1 Operation
Manual, CPM1 Operation Manual, CPM1A Operation Manual or SRM1 Mas-
ter Control Unit Operation Manual for details on inputting instructions from the
Programming Console.
1-10-4 Using Signed-binary Expansion Instructions (CQM1 Only)
The following CQM1 instructions must be allocated function codes in the
instructions table before they can be used.
• 2’S COMPLEMENT – NEG(––)
• DOUBLE 2’S COMPLEMENT – NEGL(––)
• DOUBLE BINARY ADD – ADBL(––)
• DOUBLE BINARY SUBTRACT – SBBL(––)
• SIGNED BINARY MULTIPLY – MBS(––)
• DOUBLE SIGNED BINARY MULTIPLY – MBSL(––)
• SIGNED BINARY DIVIDE – DBS(––)
• DOUBLE SIGNED BINARY DIVIDE – DBSL(––)
Allocating Function
Codes
The procedure to using the Programming Console to allocate function codes
is shown in the CQM1 Operation Manual. Be sure that pin 4 on the CQM1’s
DIP switch is turned ON to enable use of a user-set instruction table before
performing this operation.
Flag ON conditions
Carry Flag (SR 25504) Carry in an addition.
Negative results for subtraction.
Equals Flag (SR 25506) The results of addition, subtraction, multiplica-
tion, or division is 0.
Results of converting 2’s complement is 0.
Overflow Flag (SR 25404) 32,767 (7FFF) was exceeded in results of 16-bit
addition or subtraction.
2,147,483,647 (7FFF FFFF) was exceeded in
results of 32-bit addition or subtraction.
Underflow Flag (SR 25405) –32,768 (8000) was exceeded in results of 16-bit
addition or subtraction, or conversion of 2’s com-
plement.
–2,147,483,648 (8000 0000) was exceeded in
results of 32-bit addition or subtraction, or con-
version of 2’s complement.

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
BrandOmron
ModelCPM1
CategoryController
LanguageEnglish

Related product manuals