DL06 Micro PLC User Manual, 3rd Edition, Rev. E
5-268
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Sum BCD Numbers (SUMBCD) (IB-522)
Sum BCD Numbers sums up a list of consecutive 4-digit WORD BCD numbers into an
8-digit DWORD BCD result.
SUMBCD Parameters
• Start Address: specifies the starting address of a block of V-memory location values to be added
together (BCD)
• End Addr (inclusive): specifies the ending address of a block of V-memory location values to be added
together (BCD)
• Result (DWORD BCD): specifies the location where the sum of the block of V-memory BCD values
will be placed
SUMBCD Example
In the following example, the SUMBCD instruction is used to total the sum of all BCD values
in words V2000 thru V2007 and store the resulting 8-digit double word BCD value in V3000
and V3001 when C100 turns on.
Parameter
DL06 Range
Start Address
V
See DL06 V-memory map - Data Words
End Address (inclusive)
V
See DL06 V-memory map - Data Words
Result (DWORD BCD)
V
See DL06 V-memory map - Data Words
DS
Used
HPP
N/A
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).
SUMBCD could be used as the first part of
calculating an average.