Gray Code Bin Conversion; 32-Bit Gray Code 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.13 Gray code
The specified gray code 16-bit data is converted into BIN 16-bit data.
Function definition BOOL GBIN_M (BOOL EN, ANY16 S1, ANY16 D);
5.6.14 32-bit gray code
The specified gray code 32-bit data is converted into BIN 32-bit data.
Function definition
5 - 29
BIN conversion
Argument Name
EN
S1
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the gray code 16-bit data in D100 is
(* converted into BIN 16-bit data, and the result is stored into D200.
GBIN_M (X0, D100, D200);
Corresponding MELSEC command
GBIN (Conversion of Gray code to BIN 16-bit data)
BIN conversion
BOOL DGBIN_M (BOOL EN, ANY32 S1, ANY32 D);
Argument Name
EN
S1
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the gray code 32-bit data in dwData1 *)
(* is converted into BIN 32-bit data, and the result is stored into Result.
DGBIN_M (X0, dwData1, Result);
Corresponding MELSEC command
DGBIN (Conversion of Gray code to BIN 32-bit data)
GBIN_M
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
Data to be converted (gray code 16-bit data)
IN
OUT
Conversion result (BIN 16-bit data)
DGBIN_M
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
Data to be converted (gray code 32-bit data)
IN
Conversion result (BIN 32-bit data)
OUT
For the usable data type, refer to "3.2.2
About ANY type".
Description
Description
Description
Description
*)
*)
*)
5 - 29

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents