6 - 26 6 - 26
6 IEC FUNCTIONS
6.4.2 Floating-point COS operation COS
COS_E
The COS (cosine) value of the specified angle is operated.
Function definition
REAL COS( REAL S1 );
Argument
Argument Name
IN/OUT
Description
S1
IN
Angle data to be COS (cosine) operated (real number data)
Remarks: Set the specified angle in radian unit (angle / 180).
Return value
Return Value
Description
REAL
COS operation result (real number data)
Example of use
Argument Type
ST Program
Conversion Result
Used Instruction
REAL
w_Real1 := COS( w_Real2 ); LD
SM400
COS w_Real2
w_Real1
LD,COS
Function definition
BOOL COS_E( BOOL EN, REAL S1, REAL D1 );
Argument
Argument Name
IN/OUT
Description
EN
IN
Execution condition (Function is executed only when the result is TRUE)
S1
IN
Angle data to be COS (cosine) operated (real number data)
Remarks: Set the specified angle in radian unit (angle / 180).
D1
OUT
COS operation result (real number data)
Remarks: Set the specified angle in radian unit (angle / 180).
Return value
Return Value
Description
BOOL Execution
condition
Example of use
(*
(*
When execution condition X0 turns ON, the COS value of the angle data
stored in rData is calculated, and the result is stored into Result.
M0 := COS_E( X0, rData, Result ) ;
*)
*)
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......