7-308
BSQR(P),BDSQR(P)
(2) The following program calculates the square root of BCD value 74625813 and outputs the
integer part of the result to the 4 BCD digits at Y50 to Y5F, and the decimal fraction part to
the 4 BCD digits from Y40 to Y4F.
[Ladder Mode]
[List Mode]
[Operation]
Sets the data (BCD value) used
for square root operation ( )
Executes square root operation ( )
Outputs the integer part of the
operation result to a display device ( )
Outputs the decimal fraction part of
the operation result to a display device ( )
1
2
3
4
Step Instruction Device
BDSQR operation
BDSQR
D2
BCD value
8638
D3
BCD value
6233
D0
BCD value
5813
D1
7462
DMOV
BCD value
74625813
Y5F
BCD value
8638
Y50
Y4F
BCD value
6233
Y40
Transfer
MOV
Transfer
MOV
Integer part
Decimal fraction part
1
2
3
4