124
4
4 Instructions4.4.3 Trigonometric Functions
Example 1:
M10
ǒDASIN D0 D2Ǔ
S D
M11
When M10 = ON, the sine-1 of the binary
floating-point number in (D1, D0) is calculated.
The result is stored in (D3, D2).
ǒDASINP D10 D12Ǔ
(D1ǃD0)
(D3ǃD2)
SIN
-1
Example 2:
M10
ǒDASIN D0 D2Ǔ
Assume that the value in (D1, D0) is 0.707106781.
When M10 switches from OFF to ON, the value in
(D3, D2) is 0.78539815, that in (D5, D4) is 45, and
that in (D7, D6) is 45.
ǒDDEG D2 D4Ǔ
ǒDINT D4 D6Ǔ
ACOS: Binary oating point ARCCOS operation
◆
Overview
The ACOS instruction calculates the cosine in radians.
ACOS S D
Binary oating point
ARCCOS operation
Applicable model:
H3U
S
Data
source
Binary oating-point variable whose arccosine is to be
calculated
32-bit instruction
(9 steps)
DACOS: Continuous
execution
DACOSP: Pulse
execution
D
Operation
result
Operation result storage unit (0 to π)
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D 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.
◆
Function
The cosine in radians is calculated.
Note: An operation error will occur if the value in S exceeds the range –1.0 to +1.0. The error code is K6706
and stored in D8067. The error ag M8067 is set to ON to identify this error.