EasyManua.ls Logo

Mitsubishi MELSEC-Q/L

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
Loading...
520
RAD, RADP
Function
(1) Converts units of angle size from angle units designated by to radian units, and stores result at device number
designated by .
(2) Conversion from degree to radian units is performed according to the following equation:
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 converts the angle set by the 4 BCD digits at X20 to X2F to radians, and stores results as 32-bit
floating decimal point type real number at D20 and D21.
[Ladder Mode]
[List Mode]
[Operations involved when X20 to X2F designate a value of 120]
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 |
–– –– –– ––
S
D
+1
+1
S
D
S
D
32-bit floating-point
real number
(
)
32-bit floating-point
real number
( )rad
Radian unit = Degree unit
180
Inputs an angle to be converted
into a radian value ( )
Converts the input a 32-bit
floating-point real number ( )
Converts the converted angle into
a radian value ( )
1
2
3
Step Instruction Device
X2F
BCD value
0
D0
120
X20
Conversion
to BIN
BIN
b15
b0
BIN value
120
Conversion to
floating-point
FLT
Conversion
to radian
D11 D10
RAD
D21
D20
120 2
.
094395

Table of Contents

Related product manuals