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 #419 background imageLoading...
Page #419 background image
2-371
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Conversion Instructions
2
Decoder
Decoder
The Decoder instruction sets the specified bit to TRUE and the other bits to FALSE in array elements
that consist of a maximum of 256 bits.
OLL
The Decoder instruction converts array elements with 2
Size
bits that start from InOut[0] in array to con-
vert InOut[]. It sets the specified bit to TRUE. It sets the other bits to FALSE. The bit to make TRUE is
specified by the Size bits in the lower byte of conversion bit position In. Always attach the element num-
ber to the in-out parameter that is passed to InOut[], e.g., array[3].
Consider an example where In is BYTE#16#09, Size is USINT#4, and InOut[] is a BYTE array. The
value of the Size bits in the lower bits of In is 16#9, which is 9 decimal. Therefore, the ninth bit from the
least-significant bit of InOut[] is made TRUE and the other bits are made FALSE.
Instruction Name FB/FUN Graphic expression ST expression
Decoder Bit Decoder FUN Decoder(In, Size, InOut);
Variables
Name Meaning I/O Description Valid range Unit Default
In Conver-
sion bit
position
Input
Bit position to convert Depends on data type.
--- 0
Size Bits to
convert
Number of bits to convert 0 to 8 Bits 1
InOut[]
(array)
Array to
convert
In-out Array to convert Depends on data type. --- ---
Out Return
value
Output Always TRUE TRUE only --- ---
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
Size OK
InOut[]
(array)
OK OK OK OK OK
Out OK
Function
(@)Decoder
EN ENO
In Out
Size
InOut

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