546
BTAN, BTANP
: Data of which the TAN (tangent) value is obtained or head number of the devices where the data is stored (BCD 4 digits)
: Head number of the devices where the operation result will be stored (BCD 4 digits)
F
unct
i
on
(1) Calculates TAN (tangent) value for value (angle) designated by , and stores the sign for the operation result in the
word device designated by , and the operation result in the word device designated by +1 and +2.
(2) The value designated at is a BCD value which can be between 0 and 360 degrees (in units of degrees).
(3) The sign for the operation result stored in will be "0" if the result is a positive value, and "1" if the result is a negative
value.
(4) The operation results stored at +1 and +2 are BCD values within the range of from -57.2901 and 57.2902.
(5) Operation results are rounded off from the fifth decimal place.
Operat
i
on
E
rror
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into
SD0.
Program
E
xamp
l
e
(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.
7.12.31 BTAN, BTANP
BCD type TAN operation
7.12.31
BTAN, BTANP
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
K, H
Other
Bit
Word
Bit
Word
––
––
––
––
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4100
The data specified in is not a BCD value.
The data specified in is not in the range from 0 to 360.
The data specified in is 90° or 270°.
––
4101
The points of the device specified in exceed those of the
corresponding device.
––
––
––
––
Process
High
performance
Redundant Universal
LCPU
Bas
i
c
BTAN
Command
Command
B
T
A
N
P
BTANP
B
T
A
N
S
D
S
D
S
D
S
D
S
D
D
D
+2
D
S
Integer part
Decimal fraction part
.
D
Sign
TAN
+1
D
S
D
D
D
S
S
S
D