Chapter 5: Intelligent Box (IBox) Instructions
Sum BCD Numbers (SUMBCD) (IB-522)
1
Sum BCD Numbers sums up a list of consecutive 4-digit WORD BCD numbers into an 8-
digit DWORD BCD result.
230
2
You specify the group's starting and ending
240
V-memory addresses (inclusive). When
enabled, this instruction will add up all the
250-1
3
numbers in the group (so you may want to
260
place a differential contact driving the
4
enable).
DS5
Used
SUMBCD could be used as the first part of
N/A
HPP
5
calculating an average.
6
SUMBCD Parameters
• Start Address: specifies the starting address of a block of V-memory location values to be added
together (BCD)
7
• End Addr (inclusive): specifies the ending address of a block of V-memory location values to be
added together (BCD)
8
• Result (DWORD BCD): specifies the location where the sum of the block of V-memory BCD
values will be placed
9
10
Start Address . . . . . . . . . . . . . . . . . . . . . . . . . . V
End Address (inclusive) . . . . . . . . . . . . . . . . . . V
Result (DWORD BCD) . . . . . . . . . . . . . . . . . . . . V
11
SUMBCD Example
12
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
13
V3000 and V3001 when C100 turns on.
14
A
B
C
D
5–268
DL205 User Manual, 4th Edition, Rev. B
Parameter
DL205 Range
See DL205 V-memory map - Data Words
See DL205 V-memory map - Data Words
See DL205 V-memory map - Data Words
Need help?
Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?