Mitsubishi Electric MELSEC-Q/L Programming Manual page 609

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

Advertisement

Program example
• The following program seeks the inverse sine 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 0.5]
D1
D0
SIN
-1
operation
0 . 5
32-bit floating-point
ASIN
real number
Conversion
D21
D20
to BIN
3 0
32-bit floating-point
INT
real number
Calculates an angle (radian value)
by SIN
operation (
-1
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 . 5 2 3 5 9 8 8
32-bit floating-point
real number
Conversion to angle
DEG
D30
BCD operation
b15
b0
30
BIN value
BCD
)
1
)
2
)
3
)
4
Y4F
Y40
0 0 3 0
BCD value
7 APPLICATION INSTRUCTIONS
7.12 Special Function Instructions
7
607

Advertisement

Table of Contents
loading

Table of Contents