7 APPLICATION INSTRUCTIONS
7.12 Special Function Instructions
655
7
• 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]
[Operations involved when X20 to X2B designate a value of 390]
1
2
3
4
5
Processes so that the input
angle is within 360° ( )
X2B
BCD value
390
X20
B/ operation
B/
BTAN
operation
BTAN
OUT
D10
BCD value
(quotient)
0
001
D11
BCD value
(remainder)
0
0 3 0
D20
Transfer
MOV
D21
Transfer
MOV
D22
BCD value
0
000
BCD value
0
000
BCD value
5
774
BCD value
5
774
Y53
BCD value
0
Y50
Y60 OFF
1
2
3
4
5
Y4F
Y40