Omron CQM1H - PROGRAM Programming Manual page 368

Programmable controllers; inner boards
Table of Contents

Advertisement

Special Math Instructions
Description
Number of Items in Range
Addition Units
Data Type
Flags
When the execution condition is OFF, SUM(––) is not executed. When the
execution condition is ON, SUM(––) adds either the contents of words R
R
+N–1 or the bytes in words R
1
destination words (D and D+1). The data can be summed as binary or BCD
and will be output in the same form. Binary data can be either signed or
unsigned.
The function of bits in C are shown in the following diagram and explained in
more detail below.
C:
15 14 13 12 11
Data type
1 (ON):
0 (OFF): BCD
Data type
1 (ON):
0 (OFF): Unsigned binary
The number of items within the range (N) is contained in the 3 rightmost digits
of C, which must be BCD between 001 and 999. This number will indicate the
number of words or the number of bytes depending the items being summed.
Words will be added if bit 13 is OFF and bytes will be added if bit 13 is ON.
If bytes are specified, the range can begin with the leftmost or rightmost byte
of R
. The leftmost byte of R
1
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.
ER:
Indirectly addressed EM/DM word is non-existent.
(Content of *EM/*DM word is not BCD, or the EM/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 is not BCD when BCD was designated.
EQ:
ON when the result is zero.
to R
+N/2–1 and outputs that value to the
1
1
00
Number of items in range (N, BCD)
Number of words or number of bytes
001 to 999
First byte (when bit 13 is ON)
1 (ON):
0 (OFF): Leftmost
Addition units
1 (ON):
0 (OFF): Words
Binary
Signed binary
will not be added if bit 12 is ON.
1
MSB LSB
R
1
2
1
R
+1
3
4
1
R
+2
5
6
1
R
+3
7
8
1
Section 5-23
to
1
Rightmost
Bytes
343

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?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Sysmac cqm1h seriesSysmac cqm1h-cpu series

Table of Contents

Save PDF