Mitsubishi MELSEC Q Series Programming Manual page 681

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

(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]
Step
Instruction
[Operation]
1
7 4 6 2
74625813
DMOV
BCD value
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 (
Device
D1
D0
BDSQR operation
2
5 8 1 3
BDSQR
BCD value
BSQR(P),BDSQR(P)
)
1
)
2
)
3
D2
Transfer
Y5F
Y50
3
8 6 3 8
8 6 3 8
BCD value
MOV
BCD value
D3
Transfer
Y4F
Y40
4
6 2 3 3
6 2 3 3
BCD value
MOV
BCD value
1
2
3
)
4
4
6
6
7
Integer part
8
Decimal fraction part
7-307

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents