Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
22 Applied Instructions (External Device)
22.2 GBIN / Gray Code to Decimal Conversion
570
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Function and operation explanation
1. 16-bit operation (GBIN, GBINP)
1) This instruction can be used for detecting an absolute position by a gray code type encoder.
2) The device specified by can store a value from 0 to 32,767.
2. 32-bit operation (DGBIN, DGBINP)
1) A gray code can be converted into a binary value of up to 32 bits.
2) The device specified by can store a value from 0 to 2,147,483,647.
Cautions
1) When an input relay (X) is specified as , the response delay will be "Scan time of PLC + Input filter
constant."
The input filter value can be changed in X000 to X017 using REFF, REFFP or D8020 (filter adjustment)
so that the filter constant delay is eliminated.
*1. The FX
2N-16M, FX2NC-16M, FX3G and FX3GC PLCs use X000 to X007.
2) Some restrictions to applicable devices
S1: The FX
3G, FX3GC, FX3U and FX3UC PLCs only are applicable.
S2: The FX
3U and FX3UC PLCs only are applicable.
[Structured ladder/FBD]
When the device specified by is K3X000 and the device
specified by is D10
s
d
This instruction converts and transfers data from
the source (gray code) to the destination (binary).
GBIN
EN ENO
d
s
Command
input
Conversion source data
or word device storing
conversion source data
Word device storing
data after conversion
110111010110
0100101100100000
b0
b15
X10 X7 X0
GRY 1234
X13
BIN 1234
D10
[ST]
GBIN(EN,s,d);
[Structured ladder/FBD]
DGBIN
EN ENO
d
s
Command
input
Word device storing
data after conversion
[ST]
DGBIN(EN,s,d);
Conversion source data
or word device storing
conversion source data