EasyManuals Logo
Home>Mitsubishi>Controller>MELSEC-Q/L

Mitsubishi MELSEC-Q/L User Manual

Mitsubishi MELSEC-Q/L
850 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #519 background imageLoading...
Page #519 background image
517
ATAN, ATANP
1
2
3
4
4
6
7
8
7.12 Special function instructions
7.12.11 ATAN, ATANP
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.
*2: There are CPU modules that will not result in an operation error if -0 is specified.
For details, refer to Page 88, Section 3.2.4.
Program Example
(1) The following program seeks the inverse tangent of the 32-bit floating decimal point real number at D0 and D1, and
outputs the angle to the 4 BCD digits at Y40 to Y4F.
[Ladder Mode]
[List Mode]
[Operations involved when D0 and D1 value is 1]
Error
code
Error details
Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4100
The specified device value is -0.
*2
–– –– ––
4140
The specified device value is not within the following range:
0, 2
-126
| Specified device value | < 2
128
The specified device value is -0, unnormalized number, nonnumeric,
and ± .
–– –– –– ––
4141
The operation result exceeds the following range (when an overflow
occurs):
2
128
| Operation result |
–– –– –– ––
Calculates an angle (radian value)
by TAN
-1
operation ( )
Converts the radian value
into an angle ( )
Converts the angle in
32-bit floating-point real
number into an integer ( )
Outputs the integer-converted
angle to a display device ( )
1
2
3
4
Step Instruction Device
Conversion to BIN
32-bit floating-point
real number
D21
D20
INT
BCD operation
BCD
ATAN
Conversion to angle
DEG
Y4F
BCD value
0045
Y40
D30
b15 b0
BIN value
45
32-bit floating-point
real number
D1
1
D0
32-bit floating-point
real number
D11
D10
TAN
-1
operation
0
.
785398
45

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC-Q/L and is the answer not in the manual?

Mitsubishi MELSEC-Q/L Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC-Q/L
CategoryController
LanguageEnglish

Related product manuals