EasyManua.ls Logo

Mitsubishi MELSEC-Q/L - Page 521

Mitsubishi MELSEC-Q/L
850 pages
Print Icon
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...
519
RAD, RADP
1
2
3
4
4
6
7
8
7.12 Special function instructions
7.12.13 RAD, RADP
Program Example
(1) The following program seeks the inverse tangent of the 64-bit floating decimal point real number at D0 to D3, and outputs
the angle to the 4 BCD digits at Y40 to Y4F.
[Ladder Mode]
[List Mode]
[Operations involved when D0 to D3 value is 1]
: Angle to be converted to radian units or head number of the devices where the angle is stored (real number)
: Head number of the devices where the value converted in radian units will be stored (real number)
*1: Applicable for the Universal model QCPU, LCPU.
7.12.13 RAD, RADP Conversion from floating-point angle to radian
(Single pre cision)
7.12.13
RAD, RADP
Basic model QCPU: The serial number (first five digits) is
"04122" or later.
Setting
Data
Internal Devices
R, ZR
J\
U\G
Zn
Constants
E
Other
Bit Word Bit Word
–– ––
*1
––
–– ––
*1
––
1
Calculates an angle (radian value) by TAN
operation ( ).
Converts the radian value into
an angle ( ).
Converts the angle in 64-bit floating-point
real number into an integer ( ).
Outputs the integer-converted angle
to a display device ( ).
1
2
3
4
Step Instruction Device
64-bit floating-point
real number
64-bit floating-point
real number
D1
1
D0D3 D2
64-bit floating-point
real number
D21
45
D20D23 D22
D11
0.785398
D10D13 D12
Conversion
to BIN
INTD
BCD operation
BCD
ATAND
Conversion to angle
DEGD
Y4F
BCD value
0
0 4 5
Y40
D30
b15 b0
BIN value
45
TAN operation
1
1
2
3
4
Basic
Process
High
performance
Redundant
Universal
LCPU
Ver.
Command
Command
RADP
RAD
RADP
RAD S D
S D
S
D
S
D

Table of Contents

Related product manuals