Bin Gray Code Conversion; 32-Bit Bin Gray Code 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.11 BIN
gray code conversion
The specified BIN 16-bit data is converted into gray code 16-bit data.
Function definition
5.6.12 32-bit BIN
The specified BIN 32-bit data is converted into gray code 32-bit data.
Function definition
5 - 28
BOOL GRY_M (BOOL EN, ANY16 S1, ANY16 D);
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 gray code 16-bit data, and the result is stored into D100.
GRY_M (X0, D0, D100);
Corresponding MELSEC command
GRY (Conversion from BIN 16-bit data to Gray code)
gray code conversion
BOOL DGRY_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 BIN 32-bit data in dwData1 is
(* converted into gray code 32-bit data, and the result is stored into Result.
DGRY_M (X0, dwData1 Result);
Corresponding MELSEC command
DGRY (Conversion from BIN 32-bit data to Gray code)
GRY_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 (gray code 16-bit data)
DGRY_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 (gray code 32-bit data)
OUT
For the usable data type, refer to "3.2.2
About ANY type".
Description
Description
Description
Description
*)
*)
*)
*)
5 - 28

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents