![background image](http://html1.mh-extra.com/html/omron/sysmac-c200hs/sysmac-c200hs_operation-manual_742436248.webp)
238
Description
When the execution condition is OFF, SUM(––) is not executed. When the ex-
ecution condition is ON, SUM(––) adds either the contents of words R
1
to
R
1
+N–1 or the bytes in words R
1
to R
1
+N/2–1 and outputs that value to the desti-
nation 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.
15 14 13 12 11
00
Number of items in range (N, BCD)
Number of words or number of bytes
001 to 999
Starting byte in R1 (when bit 13 is ON)
1 (ON):
Rightmost
0 (OFF): Leftmost
Addition units
1 (ON):
Bytes
0 (OFF): Words
C:
Data type
1 (ON):
Binary
0 (OFF): BCD
Data type (when bit 14 is ON)
1 (ON):
Signed binary
0 (OFF): Unsigned binary
Number of Items in Range
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 num-
ber of words or the number of bytes depending the items being summed.
Addition Units
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
1
. The leftmost byte of R
1
will not be added if bit 12 is ON.
MSB LSB
R
1
1
2
R
1
+1
3
4
R
1
+2
5
6
R
1
+3
7
8
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 Type
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.
Refer to page 29 for details on signed binary data.
Data within the range is treated as BCD when bit 14 of C is OFF, regardless of the
status of bit 15.
Flags
ER:
Indirectly addressed DM word is non-existent. (Content of
:
DM word is
not BCD, or the DM area boundary has been exceeded.)
R
1
and R
1
+N–1 are not in the same data area.
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.
Special Math Instructions
Section 5-21
Содержание SYSMAC C200HS
Страница 1: ...Cat No W235 E1 05 C200HS SYSMAC Programmable Controllers...
Страница 2: ...C200HS Programmable Controllers Operation Manual Revised February 2002...
Страница 3: ...iv...
Страница 5: ...vi...
Страница 379: ...371 SR word Corresponding key s Bit 279 03 04 05 3 06 07 VER 08 09 Monitoring Operation and Modifying Data Section 7 1...
Страница 470: ...468 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage...
Страница 471: ...469 Programmer Program Date Page TC address T or C Set value Notes TC address T or C Set value Notes Timers and Counters...