Sum: Sum(167) - Omron SYSMAC CVM1 Series Operation Manual

Duplex system
Hide thumbs Also See for SYSMAC CVM1 Series:
Table of Contents

Advertisement

Special Math Instructions

5-23-3 SUM: SUM(167)

Ladder Symbol
(167)
SUM
C
Variations
j SUM(167)
Description
Precautions
Flags
Example
0000
00
R
D
1
When the execution condition is OFF, SUM(167) is not executed. When the ex-
ecution condition is ON, SUM(167) computes the sum of the contents of words
from R
to R
+N–1 and outputs that value to the destination words (D and D+1).
1
1
The number of words within the range (N) is contained in the 3 rightmost digits of
C, which must be BCD between 001 and 999.
When bit 15 of C is OFF, data within the range is treated as unsigned binary and
when it is ON the data is treated as signed binary. Refer to 3-2 Data Area Struc-
ture for information on signed and unsigned binary data.
When bit 14 of C is OFF, data within the range is treated as BCD and when it is
ON the data is treated as binary. The data will be treated as BCD when bit 14 is
OFF, even if bit 15 is ON, indicating signed binary data.
C:
15 14 13 12 11
The 3 rightmost digits of C must be BCD between 001 and 999.
R
and R
+N–1 must be in the same data area.
1
1
If bit 14 of C is OFF (setting for BCD data), all data within the range R
must be BCD.
Note Refer to page 101 for general precautions on operand data areas.
ER (A50003):
The 3 rightmost digits of C are not BCD between 001 and 999.
Bit 14 of C is OFF, indicating BCD data, but the content of a
word within the range is not BCD.
Content of *DM word is not BCD when set for BCD.
EQ (A50006):
The result is zero.
N (A50008):
Shows the status of bit 15 of D+1.
When CIO 000000 is ON in the following example, SUM(167) computes the sum
of the contents of the words within the 10-word range from D00000 to D00009
and outputs that value to D00100 and D00101. The data is treated as unsigned
binary data because the leftmost digit of the control word is 4.
(167)
SUM
#4010 D00000
Operand Data Areas
C: Control word
st
R
: 1
word in range
1
st
D: 1
destination word CIO, G, A, DM
Data type
1 (ON):
Signed binary
0 (OFF): Unsigned binary
D00100
Section 5-23
CIO, G, A, #, DM, DR, IR
CIO, G, A, T, C, DM
00
Number of words
in range (N)
Not used – set to zero.
Data type
1 (ON):
Binary
0 (OFF): BCD
1
Address Instruction
00000
LD
00001
SUM(167)
to R
+N–1
1
Operands
000000
#4010
D00000
D00100
309

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cv seriesSysmac cvm1d series

Table of Contents