EasyManuals Logo

Omron NJ501-1500 User Manual

Omron NJ501-1500
990 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #486 background imageLoading...
Page #486 background image
2 Instruction Descriptions
2-438
NJ-series Instructions Reference Manual (W502)
GrayToBin_** and BinToGray_**
z GrayToBin_**
The GrayToBin_** instructions convert the gray code in date to convert In to a bit string. The conversion
procedure is as follows for when In and Out are BYTE data.
1
The most-significant bit (bit 7) of In is used as is as the most-significant bit (bit 7) of Out.
2
An exclusive logical OR is taken of the value of bit 6 in In and the value of bit 7 in Out. The result
is used as bit 6 of Out.
3
This process is repeated through the least-significant bit (bit 0) of Out.
GrayToBin_**: Converts a gray code to a bit string.
BinToGray_**: Converts a bit string to a gray code.
Instruction Name FB/FUN Graphic expression ST expression
GrayToBin_** Gray Code-to-
Binary Code
Conversion Group
FUN Out:=GrayToBin_**(In);
"**" must be a bit string data
type.
BinToGray_** Binary Code-to-
Gray Code
Conversion
FUN Out:=BinToGray_**(In);
"**" must be a bit string data
type.
Variables
Name Meaning I/O Description Valid range Unit Default
In Data to
convert
Input Data to convert Depends on data type.
--- 0
Out Conver-
sion result
Output Conversion result Depends on data type.
--- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In OK OK OK OK
Out Must be same data type as In
Function
(@)GrayToBin_**
EN ENO
In Out
"**" must be a bit string data type.
(@)BinToGray_**
EN ENO
In Out
"**" must be a bit string data type.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ501-1500 and is the answer not in the manual?

Omron NJ501-1500 Specifications

General IconGeneral
BrandOmron
ModelNJ501-1500
CategoryController
LanguageEnglish

Related product manuals