Справочник Пользователя для Mitsubishi Electronics MELSEC -Q/L
7 APPLICATION INSTRUCTIONS
7.12 Special Function Instructions
661
7
BCD type arc tangent operations
BATAN(P)
Processing details
• Performs TAN
-1
(inverse tangent) on value designated by (S) and stores operation results (angles) at device designated by
(D).
• A sign for the operation data is set at (S). If the operation data is a positive value, this is set at "0", and if it is a negative
value, it is set at "1".
• The part before the decimal point and fraction part are stored at (S)+1 and (S)+2 respectively, as BCD values. (Values from
0 to 9999.9999 can be set.)
• Operation results stored at (D) are BCD values between 0 and 90 degrees, and 270 and 360 degrees (degree units).
• Calculation results are a value from which the decimal fraction part has been rounded.
• Calculation results are a value from which the decimal fraction part has been rounded.
Operation error
• In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
(S): Number of the device where data of which the TAN
-1
(inverse tangent) value is obtained is stored (BCD 4 digits)
(D): Head number of the devices where the operation result will be stored (BCD 4 digits)
Setting
data
data
Internal device
R, ZR
J\
U\G
Zn
Constant
Others
Bit
Word
Bit
Word
(S)
(D)
Error
code
code
Error details
Q00J/
Q00/
Q01
Q00/
Q01
QnH
QnPH
QnPRH QnU
LCPU
4100
The operation data specified in (S) is not a BCD value.
4101
The points of the device specified in (S) exceed those of the corresponding
device.
device.
Process
High
performance
Redundant Universal
LCPU
Basic
BATAN
Command
Command
BATANP
BATANP
BATAN
S
D
S
D
TAN
+2
Integer part
Decimal fraction part
.
Sign
+1
)
(
D
S
S
S
1