562
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
22 External Device – FNC170 to FNC179
22.2 FNC171 – GBIN / Gray Code to Decimal Conversion
22.2
FNC171 – GBIN / Gray Code to Decimal Conversion
Outline
This instruction converts a gray code into a binary value, and transfers it.
1. Instruction format
2. Set data
3. Applicable devices
Explanation of function and operation
1. 16-bit operation (GBIN and GBINP)
- This instruction can be used for detecting an absolute position by a gray code type encoder.
-
can store a value from 0 to 32,767.
2. 32-bit operation (DGBIN and DGBINP)
- A gray code can be converted into a binary value of up to 32 bits.
-
can store a value from 0 to 2,147,483,647.
Caution
When an input relay (X) is specified as
, the response relay will be “Scan time of PLC + Input filter
constant”.
The filter constant can be changed in X000 to X017 using REFF (FNC 51) instruction or D8020 (filter
adjustment) so that the filter constant delay is eliminated.
Operand Type
Description
Data Type
Conversion source data or word device storing conversion source data
16- or 32-bit binary
Word device storing data after conversion
16- or 32-bit binary
Oper-
and
Type
Bit Devices
Word Devices
Others
System User
Digit Specification
System User
Special
Unit
Index
Con-
stant
Real
Number
Charac-
ter String
Pointer
X Y M T C S D
.b KnX KnY KnM KnS
T
C
D
R U
\G
V
Z Modify K
H
E
"
"
P
3
3
3
3
3 3 3 3
3
3 3
3
3 3
3
3
3
3 3 3 3
3
3 3
3
DGBIN
DGBINP
Mnemonic
Operation Condition
P
FNC 171
GBIN
D
16-bit Instruction
5 steps
GBIN
GBINP
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
32-bit Instruction
9 steps
Continuous
Operation
Pulse (Single)
Operation
S
D
S
D
BIN 1234
1
1
0
1
1
1
0
1
0
1
1
0
0
1
0
0
1
0
1
1
0
0
1
0
0
0
0
0
b0
b15
X10 X7
X0
GRY 1234
X13
D10
Command
input
This instruction converts and transfers data from
the source (gray code) to the destination (binary).
When is K3X000 and is D10
FNC171
GBIN
D
S
S
D
S
S
S
Содержание FX3U Series
Страница 1: ...PROGRAMMING MANUAL Basic Applied Instructions Edition FX3U FX3UC SERIES PROGRAMMABLE CONTROLLERS ...
Страница 2: ......
Страница 889: ......