DL205 User Manual, 4th Edition, Rev. B
5–269
Chapter 5: Intelligent Box (IBox) Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Sum Binary Numbers (SUMBIN) (IB-502)
Sum Binary Numbers sums up a list of consecutive 16-bit WORD Binary numbers into a 32-
bit DWORD binary result.
You specify the group's starting and ending
V-memory addresses (inclusive). When
enabled, this instruction will add up all the
numbers in the group (so you may want to
place a differential contact driving the
enable).
SUMBIN could be used as the first part of
calculating an average.
SUMBIN Parameters
• Start Address: specifies the starting address of a block of V-memory location values to be added
together (Binary)
• End Addr (inclusive): specifies the ending address of a block of V-memory location values to be
added together (Binary)
• Result (DWORD Binary): specifies the location where the sum of the block of V-memory binary
values will be placed
SUMBIN Example
In the following example, the SUMBIN instruction is used to total the sum of all Binary
values in words V2000 thru V2007 and store the resulting 8-digit double word Binary value
in V3000 and V3001 when C100 turns on.
DS5
Used
HPP
N/A
Parameter
DL205 Range
Start Address . . . . . . . . . . . . . . . . . . . . . . . . . . V
See DL205 V-memory map - Data Words
End Address (inclusive) . . . . . . . . . . . . . . . . . . V
See DL205 V-memory map - Data Words
Result (DWORD Binary) . . . . . . . . . . . . . . . . . . V
See DL205 V-memory map - Data Words
ý
ý
þ
þ
230
240
2
5
0
-1
2
6
0