3. Instructions
430
CS/CJ/NSJ Series Instructions Reference Manual (W474)
BIN_GRAY/BIN_GRAYL
Applicable Program Areas
Operands
z Operand Specifications
Flags
Instruction Mnemonic Variations
Function
code
Function
BINARY TO GRAY CODE
CONVERT
BIN_GRAY @BIN_GRAY 480
Converts the specified word of binary data to one
word of gray code.
DOUBLE BINARY TO GRAY
CODE CONVERT
BIN_GRAYL @BIN_GRAYL 481
Converts the specified two words of binary data to
two words of gray code.
Symbol
BIN_GRAY BIN_GRAYL
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or transition
programs
Usage OK OK OK OK OK OK
Operand Description
Data type Size
BIN_GRAY BIN_GRAYL BIN_GRAY BIN_GRAYL
S Binary data WORD DWORD 1 2
D Gray code data WORD DWORD 1 2
Area
Word addresses
Indirect DM/EM
addresses
Con-
stants
Registers Flags
Pulse
bits
TR
bits
CIO WR HR AR T C DM EM
@DM
@EM
*DM
*EM
DR IR
Indirect
using IR
TK CF
S
OK OK OK OK OK OK OK OK OK OK
OK
OK --- OK --- --- --- ---
D ---
Name Label Operation
Error Flag P_ER • ON if the binary code is negative (i.e., if the gray code data is #8000 to #FFFF).
• OFF in all other cases.
Equal Flag P_EQ Unchanged.
Negative Flag P_N Unchanged.
BIN_GRAY
S
D
S: Source word
(binary data)
D: Destination word
(gray code)
BIN_GRAYL
S
D
S: First source word
(binary data)
D: First destination word
(gray code)