Mitsubishi MELSEC Q Series Programming Manual page 687

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

Advertisement

Program Example
(1) The following program calculates the tangent of the data stored in the 3 BCD digits from X20
to X2B, and stores the integer part of the results in the 4 BCD digits from Y50 to Y53, and
the decimal fraction part in the 4 BCD digits from Y40 to Y4F.
Y60 is turned ON if the results of the operation are negative.
[Ladder Mode]
[List Mode]
Step
Instruction
[Operations involved when X20 to X2B designate a value of 390]
X20 B/ operation
X2B
1
3 9 0
B/
BCD value
Processes so that the input
angle is within 360° (
Device
D10
0 0 0 1
BCD value
(quotient)
2
BTAN
D11
D20
operation
0 0 3 0
0 0 0 0
BCD value
BTAN
BCD value
(remainder)
D21
0 0 0 0
BCD value
D22
5 7 7 4
BCD value
BTAN(P)
)
1
2
3
4
5
5
Y60 OFF
OUT
Transfer
3
Y53
Y50
0
MOV
BCD value
4
Transfer
Y4F
Y40
5 7 7 4
MOV
BCD value
1
2
3
4
6
6
7
8
7-313

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents