Using Signed-Binary Expansion Instructions; Application Example Using Signed Binary Data - Omron CQM1H - PROGRAM Programming Manual

Programmable controllers; inner boards
Table of Contents

Advertisement

Calculating with Signed Binary Data
Input Instructions
1-7-4

Using Signed-binary Expansion Instructions

Allocating Function
Codes
1-7-5

Application Example Using Signed Binary Data

60
CQM1H Operation Manual. Refer to the CX-Programmer Operation Manual:
C-series PCs for details on using the CX-Programmer.
Only 16-bit operands can be input for the following instructions: NEG(––),
ADB(50), SBB(51), MBS(––), and DBS(––). Refer to the CQM1H Operation
Manual for details on inputting instructions from the Programming Console.
The following CQM1H 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(––)
The procedure to using the Programming Console to allocate function codes
is shown in the CQM1H Operation Manual. Be sure that pin 4 of the CQM1H's
DIP switch is turned ON to enable use of a user-set instruction table before
performing this operation.
The following programming can be used to performed calculations such as
the following in the CQM1H:
((1234 + (–123)) x 1212 – 12345) ÷ (–1234) = –1081, Remainder of 232
000
=
04D2
001
=
FF85
LR00
=
04BC
HR50
=
3039
HR51
=
0000
DM1000
=
FB2E
DM1001
=
FFFF
1234
–123
1212
12345
–1234
Section 1-7

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CQM1H - PROGRAM and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Sysmac cqm1h seriesSysmac cqm1h-cpu series

Table of Contents

Save PDF