Mitsubishi Electric MELSEC-Q/L Programming Manual page 625

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

Advertisement

Program example
• The following program converts the radian value set with 32-bit floating decimal point type real number at D20 and D21 to
angles, and stores the result as a BCD value at Y40 to Y4F.
[Ladder Mode]
[List Mode]
Step
Instruction
[Operations involved when the values at D20 and D21 are 1.435792]
Conversion
D21
D20
to angle
1 . 4 3 5 7 9 2
32-bit floating-point
DEG
real number
Converts a radian value into
an angle (
1
Converts the angle in
32-bit floating-point real
number into an integer (
Outputs the converted integer
to a display device (
Device
Conversion
D11
D10
to BIN
8 2 . 2 6 4 8 2
32-bit floating-point
BIN
real number
)
)
2
)
3
D0
BCD operation
b15
b0
82
BIN value
BCD
7 APPLICATION INSTRUCTIONS
Y4F
Y40
0 0 8 2
BCD value
7.12 Special Function Instructions
7
623

Advertisement

Table of Contents
loading

Table of Contents