EasyManuals Logo

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 #653 background imageLoading...
Page #653 background image
7-279
DEG(P)
1
2
3
4
6
6
7
8
7.12 Special function instructions
7.12.15 Conversion from floating-point radian to angle (Single precision) (DEG(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.
• The value of the specified device is 0.
*2
(For the Basic model QCPU, High Performance model QCPU, Process CPU, Redundant
CPU) (Error code: 4100)
*2: 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 converts the radian value set with 32-bit floating decimal point type
real number at D20 and D21 to angles, and stores the result as a BCD value at Y40 to Y4F.
[Ladder Mode]
[List Mode]
[Operations involved when the values at D20 and D21 are 1.435792]
Converts a radian value into
an angle ( )
Converts the angle in
32-bit floating-point real
number into an integer ( )
Outputs the converted integer
to a display device ( )
1
2
3
Step Instruction Device
Conversion
to angle
DEG
BCD operation
BCD
D21 D20 D11 D10
Conversion
to BIN
BIN
D0
b15 b0
BIN value
82
Y4F
BCD value
0
082
Y40
32-bit floating-point
real number
32-bit floating-point
real number
1
.
4 35792 82
.
264 82

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