2' Complement Of Floating-Point - Mitsubishi Electric MELSEC Q Series Programming Manual

Structured text
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

5 MELSEC FUNCTIONS

5.6.17 2' complement of floating-point

The sign of the specified real number data is inverted. (2's complement)
Function definition
5.6.18 Block BIN
n points of BIN 16-bit data (0 to 9999), starting at the specified device, is converted into BCD 4-digit data.
Function definition
5 - 31
BOOL ENEG_M (BOOL EN, REAL D);
Argument Name
EN
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the sign of the real number data in
(* Result is inverted, and the result is stored into Result.
ENEG_M (X0, Result);
Corresponding MELSEC command
ENEG (Floating-point sign inversion (Single precision))
BCD conversion
BOOL BKBCD_M (BOOL EN, ANY16 S1, ANY16 n, ANY16 D);
Argument Name
EN
S1
n
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the BIN 16-bit data of the number
(* of points stored in W0, starting at D0, is converted into BCD, and the result is *)
(* stored into D100 and later.
BKBCD_M (X0, D0, W0, D100);
Corresponding MELSEC command
BKBCD (Conversion from block BIN 16-bit data to BCD 4-digit data)
ENEG_M
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
Data whose sign will be inverted, sign inversion result
IN/OUT
(real number data)
BKBCD_M
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
Data to be converted (BIN 16-bit data)
IN
Number of converted data
IN
Conversion result (BCD 4-digit data)
OUT
For the usable data type, refer to "3.2.2
About ANY type".
Description
Description
Description
Description
*)
*)
*)
*)
5 - 31

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents