Mitsubishi Electric MELSEC-Q/L Programming Manual page 650

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Program example
• The following program calculates the square root of BCD value 1325 and outputs the integer part to the 4 BCD digits from
Y50 to Y5F, and the decimal fraction part to the 4 BCD digits from Y40 to Y4F.
[Ladder Mode]
[List Mode]
Step
Instruction
[Operation]
1325
H
MOV
7 APPLICATION INSTRUCTIONS
648
7.12 Special Function Instructions
Sets the data 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
D0
BSQR operation
1 3 2 5
BCD value
BSQR
)
1
)
3
D1
Transfer
Y5F
0 0 3 6
0 0 3 6
MOV
BCD value
BCD value
D2
Transfer
Y4F
4 0 0 5
4 0 0 5
BCD value
MOV
BCD value
)
2
)
4
Y50
Integer part
Y40
Decimal fraction part

Advertisement

Table of Contents
loading

Table of Contents