5- 88 5- 88
5 MELSEC FUNCTIONS
5.18 Special Functions
5.18.1 Floating-point SIN operation SIN_E_MD
The SIN (sine) value of the specified angle is operated.
Function definition
BOOL SIN_E_MD (BOOL EN, REAL S1, REAL D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
S1 IN
Angle data to be SIN (sine) operated (real number data)
Remarks: Set the specified angle in radian unit (angle
/180).
D
OUT
Operation result (SIN value) (real number data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the SIN value of the angle specified *)
(* in rData is calculated, and the result is stored into Result.
*)
SIN_E_MD (X0, rData, Result);
Corresponding MELSEC command
SIN (SIN operation on floating-point data (Single precision))
5.18.2 Floating-point COS operation COS_E_MD
The COS (cosine) value of the specified angle is operated.
Function definition
BOOL COS_E_MD (BOOL EN, REAL S1, REAL D);
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).
D
OUT
Operation result (COS value) (real number data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the COS value of the angle
*)
(* specified in rData is calculated, and the result is stored into Result.
*)
COS_E_MD (X0, rData, Result)
Corresponding MELSEC command
COS (COS operation on floating-point data (Single precision))
Summary of Contents for MELSEC L series
Page 1: ...Programming Manual Structured Text ...
Page 2: ......
Page 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Page 297: ......