Fnc170 - Gry / Decimal To Gray Code Conversion - Mitsubishi Electric FX3G SERIES Programming Manual

Programmable controllers
Hide thumbs Also See for FX3G SERIES:
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
22.1
FNC170 – GRY / Decimal to Gray Code Conversion
Outline
This instruction converts a binary value into a gray code, and transfers it.
1. Instruction format
FNC 170
D
GRY
2. Set data
Operand Type
S
D
3. Applicable devices
Bit Devices
Oper-
and
System User
Type
X Y M T C S D .b KnX KnY KnM KnS
S
D
:This function is supported only in FX
Explanation of function and operation
1. 16-bit operation (GRY and GRYP)
Command
input
FNC170
When
S
is K1234 and
b15
BIN 1234
0
GRY 1234
-
S
can store a value from 0 to 32767.
2. 32-bit operation (DGRY and DGRYP)
- A binary value can be converted into a gray code of up to 32 bits.
-
S
can store a value from 0 to 2,147,483,647.
Caution
The data conversion speed depends on the scan time of the PLC.
582
Mnemonic
16-bit Instruction
P
GRY
5 steps
GRYP
Conversion source data or word device storing conversion source data
Word device storing data after conversion
Digit Specification
/FX
3U
S
D
GRY
D
is K3Y10
0
0
0
0
1
0
0
1
1
Y23
Y20 Y17
0
1
1
0
1
0
22.1 FNC170 – GRY / Decimal to Gray Code Conversion
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Unit
T
C D R U \G
PLCs.
3UC
This instruction converts and transfers data from
the source (binary) to the destination (gray code).
b0
0
1
0
0
1
0
Y10
1
1
1
0
1
1
22 External Device – FNC170 to FNC179
Mnemonic
32-bit Instruction
DGRY
9 steps
DGRYP
Con-
Real
Index
stant
Number
V
Z Modify K
H
E
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Data Type
16- or 32-bit binary
16- or 32-bit binary
Others
Charac-
Pointer
ter String
" "
P

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents