Mitsubishi MELSEC Q Series Programming Manual page 693

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

Program Example
(1) The following program performs a TAN-1 operation on the sign (positive when X0 is OFF,
and negative when X0 is ON), the 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]
X0 OFF
X2F
X20
0
0
0
1
BCD value
X3F
X30
2
6
5
4
BCD value
Device
D0
1
0
0
0
0
BCD value
D1
2
Transfer
BATAN operation
4
0
0
0
1
MOV
BCD value
D2
3
Transfer
2
6
5
4
MOV
BCD value
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 (
Y4F
Y40
0
0
5
2
BATAN
BCD value
BATAN(P)
)
1
)
2
)
3
)
4
7-319
1
2
3
4
6
6
7
8

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents