Bcd Type Cos Operation; Bcd Type Tan Operation - Mitsubishi MELSEC-q Programming Manual

Melsec q series; melsec l series
Hide thumbs Also See for MELSEC-q:
Table of Contents

Advertisement

5 MELSEC FUNCTIONS

5.18.17 BCD type COS operation

The BCD 4-digit data of the specified angle is COS (cosine) operated.
Function definition

5.18.18 BCD type TAN operation

The BCD 4-digit data of the specified angle is TAN (tangent) operated.
Function definition
5- 96
BCOS_MD
BOOL BCOS_MD (BOOL EN, ANY16 S1, ANY16(3) D);
Argument Name
EN
S1
D
Return Value
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)
BTAN_MD
BOOL BTAN_MD (BOOL EN, ANY16 S1, ANY16(3) D);
Argument Name
EN
S1
D
Return Value
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)
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be operated (BCD 4-digit data)
Operation result
OUT
(ARRAY [0..2] OF
ANY16)
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be operated (BCD 4-digit data)
Operation result
OUT
(ARRAY [0..2] OF
ANY16)
For the usable data type, refer to "3.2.2
About ANY type".
Description
D [0] Sign (positive: 0, negative: 1)
D [1] Integer part (BCD 4-digit data)
D [2] Fraction part (BCD 4-digit data)
Description
Description
D [0] Sign (positive: 0, negative: 1)
D [1] Integer part (BCD 4-digit data)
D [2] Fraction part (BCD 4-digit data)
Description
*)
*)
5- 96

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l

Table of Contents