16-Bit Bin 32-Bit Bin Conversion; 32-Bit Bin 16-Bit Bin Conversion - 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.9 16-bit BIN
32-bit BIN conversion
The specified BIN 16-bit data is converted into signed BIN 32-bit data.
Function definition BOOL DBL_M (BOOL EN, ANY16 S1, ANY32 D);
5.6.10 32-bit BIN
The specified BIN 32-bit data is converted into signed BIN 16-bit data.
Function definition
5 - 27
Argument Name
EN
S1
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the BIN 16-bit data in D0 is
(* converted into signed BIN 32-bit data, and the result is stored into Result.
DBL_M (X0, D0, Result);
Corresponding MELSEC command
DBL (Conversion from BIN 16-bit to BIN 32-bit data)
16-bit BIN conversion
BOOL WORD_M (BOOL EN, ANY32 S1, ANY16 D);
Argument Name
EN
S1
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the BIN 32-bit data stored in dwData1 *)
(* is converted into signed BIN 16-bit data, and the result is stored into D0.
WORD_M (X0, dwData1, D0);
Corresponding MELSEC command
WORD (Conversion from BIN 32-bit to BIN 16-bit data)
DBL_M
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
Data to be converted (BIN 16-bit data)
IN
OUT
Conversion result (BIN 32-bit data)
WORD_M
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
Data to be converted (BIN 32-bit data)
IN
Conversion result (BIN 16-bit data)
OUT
For the usable data type, refer to "3.2.2
About ANY type".
Description
Description
Description
Description
*)
*)
*)
5 - 27

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents