Converting 32-Bit Binary Data To Gray Code - Mitsubishi MELSEC iQ-F FX5 series Programming Manual

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

Converting 32-bit binary data to Gray code

DGRY(P)(_U)
These instructions convert the 32-bit binary data in the device specified by (s) to 32-bit binary gray code data, and store the
converted data in the device specified by (d).
Ladder diagram
(s)
(d)
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s)
DGRY(P)
Binary data or the head device where the binary
data is stored
DGRY(P)_U
(d)
DGRY(P)
Head device for storing the gray code data after
conversion
DGRY(P)_U
■Applicable devices
Operand
Bit
X, Y, M, L,
U\G T, ST,
SM, F, B, SB
(s)
(d)
Processing details
• These instructions convert the 32-bit binary data in the device specified by (s) to 32-bit binary gray code data, and store the
converted data in the device specified by (d).
b31
(s) BIN
305419896 0
0
b31
305419896 0
0
(d)
Gray code
Precautions
The data conversion speed depends on the scan time of the CPU module.
Operation error
There is no operation error.
Word
T, ST, C, D,
C, LC
W, SD, SW, R
(s)+1 (Upper 16 bits)
b16
b15
···
0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0
(d)+1
b16
b15
···
0 1 1 0 1 1 0 0 1 0 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 0 1 0 0
Structured text
ENO:=DGRY(EN,s,d);
ENO:=DGRYP(EN,s,d);
Range
0 to 2147483647
0 to 4294967295
Double word Indirect
U\G
Z
LC
LZ
(s) (Lower 16 bits)
b0
···
(d)
b0
···
ENO:=DGRY_U(EN,s,d);
ENO:=DGRYP_U(EN,s,d);
Data type
Data type (label)
32-bit signed binary
ANY32_S
32-bit unsigned binary
ANY32_U
32-bit signed binary
ANY32_S
32-bit unsigned binary
ANY32_U
Constant
specification
K, H
E
$
6 BASIC INSTRUCTIONS
6.5 Data Conversion Instructions
6
Others
267

Advertisement

Table of Contents
loading

Table of Contents