Chapter 5: Standard RLL Instructions
Sum BCD Numbers (SUMBCD) (IB-522)
1
1
Sum BCD Numbers sums up a list of consecutive 4-digit WORD BCD numbers into an
8-digit DWORD BCD result.
DS5
Used
2
2
N/A
HPP
You specify the group's starting and ending
V- memory addresses (inclusive). When
3
3
enabled, this instruction will add up all the
numbers in the group (so you may want
to place a differential contact driving the
4
4
enable).
SUMBCD could be used as the first part of
5
5
calculating an average.
6
6
SUMBCD Parameters
• Start Address: specifies the starting address of a block of V-memory location values to be added
7
7
together (BCD)
• End Addr (inclusive): specifies the ending address of a block of V-memory location values to be added
8
8
together (BCD)
• Result (DWORD BCD): specifies the location where the sum of the block of V-memory BCD values
9
9
will be placed
10
10
Start Address ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ V
End Address (inclusive) ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ V
Result (DWORD BCD) ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ V
11
11
12
12
SUMBCD Example
In the following example, the SUMBCD instruction is used to total the sum of all BCD values
13
13
in words V2000 thru V2007 and store the resulting 8-digit double word BCD value in V3000
and V3001.
14
14
a
A
b
B
c
C
D
D
5-158
DL05 Micro PLC User Manual, 6th Edition, Rev. D
Parameter
DL05 Range
See DL05 V-memory map - Data Words
See DL05 V-memory map - Data Words
See DL05 V-memory map - Data Words
Need help?
Do you have a question about the DL05 and is the answer not in the manual?