126
4
4 Instructions4.4.3 Trigonometric Functions
◆
Function
The tangent in radians is calculated.
Example 1:
M10
ǒDATAN D0 D2Ǔ
S D
M11
When M10 = ON, the tangent-1 of the binary
floating-point number in (D1, D0) is calculated.
The result is stored in (D3, D2).
ǒDATANP D10 D12Ǔ
(D1ǃD0)
(D3ǃD2)
TAN
-1
Example 2:
M10
ǒDTAN D0 D2Ǔ
Assume that the value in (D1, D0) is 1.732050808.
When M10 switches from OFF to ON, the value in (D3, D2)
is 1.04719753, that in (D5, D4) is 60, and that in (D7, D6) is 60.
ǒDDEG D2 D4Ǔ
ǒDINT D4 D6Ǔ
RAD: Binary oating point degree-to-radian conversion
◆
Overview
The RAD instruction converts binary oating-point degrees to radians. The calculation formula is [Angle in
radians = Angle in degrees x π/180].
RAD S D
Binary oating point
degree-to-radian
conversion
Applicable model:
H3U
S
Data
source
Binary oating-point degrees to be converted to radians
32-bit instruction
(9 steps)
DRAD:
Continuous
execution
DRADP: Pulse
execution
D
Operation
result
Operation result storage unit
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S1 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D1 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.