DL205 User Manual, 4th Edition, Rev. B
5–265
Chapter 5: Intelligent Box (IBox) Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Square BCD (SQUARE) (IB-523)
Square BCD squares the given 4-digit WORD BCD number and writes it as an 8-digit
DWORD BCD result.
SQUARE Parameters
• Value (WORD BCD): specifies the BCD
Word or constant that will be squared
• Result (DWORD BCD): specifies the location
where the squared DWORD BCD value will
be placed
SQUARE Example
In the following example, the SQUARE instruction is used to square the 4-digit BCD value
in V2000 and store the 8-digit double word BCD result in V3000 and V3001 when C100
turns on.
DS5
Used
HPP
N/A
Parameter
DL205 Range
Value (WORD BCD) . . . . . . . . . . . . . . . . . . V,P,K
K0-9999 ; See DL205 V-memory map - Data Words
Result (DWORD BCD) . . . . . . . . . . . . . . . . . . . . V
See DL205 V-memory map - Data Words
ý
ý
þ
þ
230
240
2
5
0
-1
2
6
0