Bcd 8-Digit Square Root; Bcd Type Sin 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.15 BCD 8-digit square root

The square root of the specified BCD 8-digit data is operated.
Function definition

5.18.16 BCD type SIN operation

The BCD 4-digit data of the specified angle is SIN (sine) operated.
Function definition
5- 95
BDSQR_MD
BOOL BDSQR_MD (BOOL EN, ANY32 S1, ANY32 D);
Argument Name
EN
S1
D
Remarks: The digits of a bit device cannot be specified in "D".
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the square root of the value specified in
(* dData is operated, and the result is stored into Result.
BDSQR_MD (X0, dData, Result);
Corresponding MELSEC command
BDSQR (BCD 8-digit square root)
BSIN_MD
BOOL BSIN_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 SIN 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]. *)
BSIN_MD (X0, iData, ArrayData);
Corresponding MELSEC command
BSIN (BCD type SIN operation)
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
BCD 8-digit data to be operated (BIN 32-bit data)
OUT
Operation result (BIN 32-bit data)
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
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- 95

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l

Table of Contents