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 #349 background imageLoading...
Page #349 background image
2-301
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Selection Instructions
2
MUX
The value of one of the input variables is assigned to Out according to the value of K. In0 is assigned if
K is 0, In1 is assigned if K is 1, etc.
The following example is for when In0 is INT#10, In1 is INT#20, In2 is INT#30, and K is USINT#2. The
value of variable abc will be INT#30.
Use the SEL instruction (page 2-298) to select one of two selections.
• In0 to InN and Out may be different data types, but observe the following precautions.
• Set the valid range of Out to include the valid ranges of In0 to InN.
• In0 to InN and Out cannot be different varieties of data types (such as a bit string and an integer,
or an integer and a text string).
• An error occurs in the following cases. ENO will be FALSE, and Out will not change.
• The value of K is outside the valid range (i.e., less than 0 or greater than N).
• A variable between In0 and InN is STRING data and the number of bytes in the selection result
exceeds the size of the output parameter that is connected to Out.
• One of the variables between In0 and InN is STRING data and it does not end in a NULL charac-
ter.
Additional Information
Precautions for Correct Use
Out: = In0
FALSE
TRUE
TRUE
K = 1
K = N
Out: = In1Out: = InN
K = 0
FALSE
TRUE
abc:=MUX(USINT#2, INT#10, INT#20, INT#30);
LD ST
INT#30
INT#20
USINT#2
INT#10
abc
MUX
EN ENO
K
In0
In1
In2

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