Mitsubishi Electric MELSEC-Q/L Programming Manual page 663

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

Advertisement

Program example
• The following program performs a TAN
BCD 4-digit integer part from X20 to X2F and the BCD 4-digit decimal fraction part from X30 to X3F, and outputs the
calculated angle in 4 BCD digits from Y40 to Y4F.
[Ladder Mode]
[List Mode]
Step
Instruction
[Operations involved when X0 and X20 to X2F designate a value of 1.2654]
1
X0 OFF
0
BCD value
Transfer
X2F
X20
2
0
0
0
1
0
MOV
BCD value
BCD value
Transfer
3
X3F
X30
2
6
5
4
2
MOV
BCD value
BCD value
-1
operation on the sign (positive when X0 is OFF, and negative when X0 is ON), the
Sets the sign of a TAN value (
Sets the integer part of a TAN value (
Sets the decimal fraction part of a TAN value (
Executes TAN -1 operation and outputs
the result of operation to Y40 to Y4F (
Device
D0
0
0
0
D1
BATAN operation
Y4F
4
0
0
1
0
0
BATAN
BCD value
D2
6
5
4
)
1
)
2
)
4
Y40
5
2
7 APPLICATION INSTRUCTIONS
7.12 Special Function Instructions
)
3
7
661

Advertisement

Table of Contents
loading

Table of Contents