Mitsubishi Electric MELSEC-Q/L Programming Manual page 603

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

Advertisement

Program example
• The following program performs a COS operation on the angle data designated by the 4 BCD digits from X20 to X2F, and
stores 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 60]
Conversion
1
X2F
X20
b15
to BIN
0
0 6 0
BCD value
BIN value
BIN
D13 D12
1.047198
64-bit floating-point
real number
Inputs an angle used for
COS operation (
Converts the input angle into a
64-bit floating-point real number (
Converts the converted angle
into a radian value (
Executes COS operation using the
converted radian value (
Device
D30
Conversion to
2
b0
floating-point
60
FLTD
D10
D11
SIN operation
4
COSD
).
1
).
2
).
3
).
4
D23 D22
D21
D20
60
64-bit floating-point
real number
Conversion to radian
3
RADD
D3 D2
D0
D1
0.500000
64-bit floating-point
real number
7 APPLICATION INSTRUCTIONS
7.12 Special Function Instructions
7
601

Advertisement

Table of Contents
loading

Table of Contents