Mitsubishi Electric MELSEC-Q/L Programming Manual page 617

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

Advertisement

Program example
• The following program seeks the inverse tangent of the 32-bit floating decimal point real number at D0 and D1, and outputs
the angle to the 4 BCD digits at Y40 to Y4F.
[Ladder Mode]
[List Mode]
Step
Instruction
[Operations involved when D0 and D1 value is 1]
D1
D0
-1
TAN
operation
1
32-bit floating-point
ATAN
real number
D21
D20
Conversion to BIN
4 5
32-bit floating-point
INT
real number
Calculates an angle (radian value)
by TAN
-1
operation (
Converts the radian value
into an angle (
Converts the angle in
32-bit floating-point real
number into an integer (
Outputs the integer-converted
angle to a display device (
Device
D11
D10
0 . 7 8 5 3 9 8
32-bit floating-point
real number
Conversion to angle
DEG
D30
BCD operation
b15
b0
45
BIN value
BCD
)
1
)
2
)
3
)
4
Y4F
Y40
0 0 4 5
BCD value
7 APPLICATION INSTRUCTIONS
7.12 Special Function Instructions
7
615

Advertisement

Table of Contents
loading

Table of Contents