6 IEC FUNCTIONS
6.4.5 Floating-point COS operation
-1
The COS
(arccosine) of the specified COS value is operated.
Function definition
Function definition
6 - 29
-1
REAL ACOS( REAL S1 );
Argument
Argument Name
IN/OUT
S1
IN
Return value
Return Value
-1
REAL
COS
operation result (real number data)
Remarks: This function cannot be used with the Basic model QCPU.
The operation result is the angle data in radian unit.
Example of use
Argument Type
REAL
w_Real1 := ACOS( w_Real2 ); LD
BOOL ACOS_E( BOOL EN, REAL S1, REAL D1 );
Argument
Argument Name
IN/OUT
EN
IN
S1
IN
D1
OUT
Remarks: The operation result is the angle data in radian unit.
Return value
Return Value
BOOL
Execution condition
Example of use
(*
When execution condition X0 turns ON, the angle is operated from the COS
(*
value stored in rData, and the result is stored into Result.
M0 := ACOS_E( X0, rData, Result ) ;
ACOS
ACOS_E
COS value to be COS
data)
ST Program
Conversion Result
ACOS
Execution condition (Function is executed only when the result is TRUE)
COS value to be COS
data)
-1
COS
operation result (real number data)
Description
-1
(arccosine) operated (-1.0 to 1.0) (real number
Description
SM400
LD,ACOS
w_Real2
w_Real1
Description
-1
(arccosine) operated (-1.0 to 1.0) (real number
Description
Used Instruction
*)
*)
6 - 29