Mitsubishi Electric MELSEC-Q/L Programming Manual page 607

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

Advertisement

Program example
• The following program performs a TAN operation on the angle data set by the 4 BCD digits from X20 to X2F, and stores the
results as 64-bit floating decimal point type real numbers at D0 to D3.
[Ladder Mode]
[List Mode]
Step
Instruction
[Operations involved when X20 to X2F designate a value of 135]
Conversion
1
X2F
X20
b15
to BIN
0
1 3 5
BCD value
BIN
D23 D22
2.356194
64-bit floating-point
real number
Inputs an angle used for TAN
operation (
Converts the input angle into a
64-bit floating-point real number (
Converts the converted angle into a
radian value (
Executes TAN operation using the
converted radian value (
Device
D30
Conversion to
2
b0
floating-point
135
BIN value
FLTD
D21
D20
TAN operation
4
TAND
).
1
).
2
).
3
).
4
D23 D22
D21
D20
135
64-bit floating-point
real number
Conversion to radian
3
RADD
D23 D22
D21
D20
-1.000000
64-bit floating-point
real number
7 APPLICATION INSTRUCTIONS
7.12 Special Function Instructions
7
605

Advertisement

Table of Contents
loading

Table of Contents