Mitsubishi MELSEC-Q/L Programming Manual page 548

Table of Contents

Advertisement

BTAN, BTANP
7.12.31 BTAN, BTANP
BCD type TAN operation
7.12.31
BTAN, BTANP
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)
S
: Head number of the devices where the operation result will be stored (BCD 4 digits)
D
Setting
Internal Devices
Data
Bit
Word
S
––
D
Function
(1) Calculates TAN (tangent) value for value (angle) designated by
word device designated by
(2) The value designated at
(3) The sign for the operation result stored in
value.
(4) The operation results stored at
(5) Operation results are rounded off from the fifth decimal place.
Operation Error
(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.
Error
code
The data specified in
4100
The data specified in
The data specified in
The points of the device specified in
4101
corresponding device.
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.
546
Command
Command
J
R, ZR
Bit
, and the operation result in the word device designated by
D
D
TAN
S
Sign
is a BCD value which can be between 0 and 360 degrees (in units of degrees).
S
will be "0" if the result is a positive value, and "1" if the result is a negative
D
+1 and
+2 are BCD values within the range of from -57.2901 and 57.2902.
D
D
Error details
is not a BCD value.
S
is not in the range from 0 to 360.
S
is 90° or 270°.
S
exceed those of the
D
High
Basic
performance
BTAN
BTANP
\
U
\G
Word
––
, and stores the sign for the operation result in the
S
D
+1
D
+2
Integer part
Decimal fraction part
.
Q00J/
Q00/
QnH
Q01
––
––
––
Process
Redundant Universal
LCPU
S
D
S
D
Constants
Zn
Other
K, H
+1 and
+2.
D
D
QnPH QnPRH
QnU
––
––
––
––
LCPU

Advertisement

Table of Contents
loading

Table of Contents