Mitsubishi Electric MELSEC-Q/L Programming Manual page 627

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

Advertisement

Program example
• The following program converts the radian value set with 64-bit floating decimal point type real number at D20 to D23 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 to D23 are 1.435792]
Conversion
1
D23 D22
D21
D20
to angle
1.435792
DEGD
64-bit floating-point
real number
Converts a radian value into an angle (
Converts the angle in 64-bit floating-point
real number into an integer (
Outputs the converted integer to a display
device (
).
3
Device
2
Conversion
D13 D12
D11
D10
to BIN
82.26482
64-bit floating-point
real number
).
1
).
2
D0
BCD operation
b15
b0
3
82
INTD
BCD
BIN value
7 APPLICATION INSTRUCTIONS
7.12 Special Function Instructions
Y4F
Y40
0 0 8 2
BCD value
625
7

Advertisement

Table of Contents
loading

Table of Contents