529
Conversion Instructions Section 3-12
3-12-18GRAY CODE CONVERT: GRY(474)
Purpose Converts the gray binary code in a specified word to standard binary data,
BCD data, or an angle at the specified resolution.
This instruction is supported by only CS/CJ-series CPU Unit Ver. 2.0 or later
(including CS1-H, CJ1-H, and CJ1M CPU Units from lot number 030201 or
later).
Ladder Symbol
Variations
Applicable Program Areas
Operands C: Control Word
Specifies the parameters for the conversion as shown below.
GRY(474)
C
S
D
C: First control word
S: Source word
D: First destination word
Variations Executed Each Cycle for ON Condition GRY(474)
Executed Once for Upward Differentiation @GRY(474)
Executed Once for Downward Differentiation Not supported
Immediate Refreshing Specification Not supported
Block program areas Step program areas Subroutines Interrupt tasks
OK OK OK OK
C
0
4 3 7 8111215
C+1
C+2
15 1112 0
Do not
use (0).
Operating Mode
0 hex = Gray binary code conversion
Conversion Mode
0 hex = Binary Mode, 1 hex = BCD Mode, 2 hex = 360° Mode
Resolution
0 or 1 to F hex (1 to 15 decimal) bits
0 hex = User specified in bits 12 to 15 of C+2.
Zero Point Compensation (0000 to 7FFF Hex (Binary Data))
Note: Zero point compensation that exceeds the resolution set in the word C of the control
data cannot be specified.
User-specified Resolution
0 hex = 256, 1 hex = 360, 2 hex = 720, 3 hex = 1,024, 4 to F hex = Do not use.
Encoder Remainder Compensation (Binary Data)
Note: The range that can be set depends on the user-specified resolution.
Note: The above settin