5- 96 5- 96
5 MELSEC FUNCTIONS
5.18.17 BCD type COS operation BCOS_MD
The BCD 4-digit data of the specified angle is COS (cosine) operated.
Function definition
BOOL BCOS_MD (BOOL EN, ANY16 S1, ANY16(3) D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
S1
IN
Data to be operated (BCD 4-digit data)
D [0] Sign (positive: 0, negative: 1)
D [1] Integer part (BCD 4-digit data)
D OUT
Operation result
(ARRAY [0..2] OF
ANY16)
D [2] Fraction part (BCD 4-digit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the COS value of the angle specified in iData is *)
(* operated, the sign of the operation result is stored into ArrayData [0], the integer part of *)
(* the operation result into ArrayData [1], and the fraction part into ArrayData [2].
*)
BCOS_MD (X0, iData, ArrayData);
Corresponding MELSEC command
BCOS (BCD type COS operation)
5.18.18 BCD type TAN operation BTAN_MD
The BCD 4-digit data of the specified angle is TAN (tangent) operated.
Function definition
BOOL BTAN_MD (BOOL EN, ANY16 S1, ANY16(3) D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
S1
IN
Data to be operated (BCD 4-digit data)
D [0] Sign (positive: 0, negative: 1)
D [1] Integer part (BCD 4-digit data)
D OUT
Operation result
(ARRAY [0..2] OF
ANY16)
D [2] Fraction part (BCD 4-digit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the TAN value of the angle specified in iData is *)
(* operated, the sign of the operation result is stored into ArrayData [0], the integer part of *)
(* the operation result into ArrayData [1], and the fraction part into ArrayData [2].
*)
BTAN_MD (X0, iData, ArrayData);
Corresponding MELSEC command
BTAN (BCD type TAN operation)
For the usable data type, refer to "3.2.2
About ANY type".
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......