Converting 16-Bit Binary Data To Gray Code Data - Mitsubishi Electric MELSEC iQ-R Series Programming Manual

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Converting 16-bit binary data to Gray code data

GRY(P)(_U)
RnPCPU
RnCPU RnENCPU
(Process)
These instructions convert the specified 16-bit binary data to 16-bit binary Gray code data.
Ladder
(s)
FBD/LD
EN
ENO
s
d
■Execution condition
Instruction
GRY
GRY_U
GRYP
GRYP_U
Setting data
■Description, range, data type
Operand
(s)
GRY(P)
GRY(P)_U
(d)
GRY(P)
GRY(P)_U
EN
ENO
■Applicable devices
Operand
Bit
X, Y, M, L,
SM, F, B, SB,
FX, FY
(s)
(d)
Processing details
• These instructions convert the 16-bit binary data in the device specified by (s) to 16-bit binary Gray code data, and store the
converted data in the device specified by (d).
b15
(s) BIN
1234
0
0
b15
(d)
1234
0
0
6 BASIC INSTRUCTIONS
426
6.6 Data Conversion Instructions
RnPCPU
RnSFCPU RnSFCPU
(Redundant)
(Standard)
(Safety)
(d)
Execution condition
Description
Binary data or the device where the binary data
is stored
Device for storing the converted Gray code
data
Execution condition
Execution result
Word
J\
T, ST, C, D, W,
SD, SW, FD, R,
ZR, RD
∙∙∙
0
0
0
1
0
0
1
1
∙∙∙
0
0
0
1
1
0
1
0
ST
ENO:=GRY(EN,s,d);
ENO:=GRYP(EN,s,d);
Range
0 to 32767
0 to 65535
U\G, J\,
Z
U3E\(H)G
b0
0
1
0
0
1
0
b0
1
1
1
0
1
1
ENO:=GRY_U(EN,s,d);
ENO:=GRYP_U(EN,s,d);
Data type
16-bit signed binary
16-bit unsigned binary
16-bit signed binary
16-bit unsigned binary
Bit
Bit
Double word Indirect
specification
LT, LST,
LZ
LC
Data type (label)
ANY16_S
ANY16_U
ANY16_S
ANY16_U
BOOL
BOOL
Constant
Others
K, H E
$

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents