Omron SYSMAC C200HS Operation Manual page 248

Programmable controllers
Hide thumbs Also See for SYSMAC C200HS:
Table of Contents

Advertisement

Special Math Instructions
Description
C:
15 14 13 12 11
Number of Items in Range
Addition Units
Data Type
Flags
238
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
R
+N–1 or the bytes in words R
1
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.
Data type
1 (ON):
Binary
0 (OFF): BCD
Data type (when bit 14 is ON)
1 (ON):
Signed binary
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 num-
ber 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.
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.
Indirectly addressed DM word is non-existent. (Content of :DM word is
ER:
not BCD, or the 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 desti-
1
1
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
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-21
to
1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents