EasyManuals Logo
Home>Mitsubishi>Controller>MELSEC Q Series

Mitsubishi MELSEC Q Series Programming Manual

Mitsubishi MELSEC Q Series
1296 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 #632 background imageLoading...
Page #632 background image
7-258
TAN(P)
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.
• Operation results are outside the range shown below:
0, 2
-126
|operation result| 2
128
(For the Basic model QCPU, High Performance model QCPU, Process CPU, Redundant
CPU) (Error code: 4100)
• The value of the specified device is 0.
*3
(For the Basic model QCPU, High Performance model QCPU, Process CPU, Redundant
CPU) (Error code: 4100)
*3: There are CPU modules that will not result in an operation error if 0 is specified. For details, refer to 3.2.4.
• The result exceeds the following range (Operation results in an overflow)
(For the Universal model QCPU, LCPU)
2
128
| Operation result | (Error code: 4141)
• The value of the specified device is 0, unnormalized number, nonnumeric, and ± .
(For the Universal model QCPU, LCPU) (Error code: 4140)
Program Example
(1) The following program performs a TAN operation on the angle data set by the 4 BCD digits
from X20 to X2F, and stores the results as 32-bit floating decimal point type real numbers at
D0 and D1.
[Ladder Mode]
[List Mode]
[Operations involved when X20 to X2F designate a value of 135]
Inputs an angle used for TAN
operation ( ).
Converts the input angle into a 32-bit
floating-point real number ( ).
Converts the converted angle
into a radian value ( ).
Executes TAN operati
on using
the converted radian value ( ).
1
2
3
4
Step Instruction Device
Conversion to radian
32-bit floating-point
real number
D21
D20
RAD
TAN operation
32-bit floating-point
real number
D11
D10
TAN 32-bit floating-point
real number
D1
D0
X2F
BCD value
0
D30
1
35
X20
Conversion to BIN
BIN
b15
b0
BCD value
Conversion to floating-point
FLT
135
135 2
.
356194 1
.
00000
0

Table of Contents

Other manuals for Mitsubishi MELSEC Q Series

Questions and Answers:

Question and Answer IconNeed help?

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

Mitsubishi MELSEC Q Series Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC Q Series
CategoryController
LanguageEnglish

Related product manuals