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 #201 background imageLoading...
Page #201 background image
2-153
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Math Instructions
2
ADD (+)
If In1 to InN are STRING data, the text strings are joined. However, if In1 to InN are STRING data, you
must use the instruction in a ladder diagram.
The following example is for when In1 is UV, In2 is WX and In3 is YZ. The value of variable abc will be
UVWXYZ.
The functions of the ADD instruction and the + instruction are exactly the same. Use the form that is
easier to use.
• When you calculate real numbers, use the CheckReal instruction (page 2-209) to see if Out is posi-
tive infinity, negative infinity, or nonnumeric data.
• Use the CONCAT instruction (page 2-520) to join text strings in structured text.
• When you add numbers, set the data type of Out to include the valid ranges of In1 to InN.
• If In1 to InN and Out are integers, make sure the addition result will fit in the valid range of Out. Oth-
erwise, the value of Out will be an illegal value. An error will not occur.
• If any of In1 to InN is a real number and the addition result will not fit in the valid range of Out, the
value of Out will be positive or negative infinity.
• When you join text strings, use STRING data for In1 to InN and Out.
• The results for overflows in addition are different for ladder diagrams and ST. In a ladder diagram, the
calculation is performed within the range of the data type of the input variables. In ST, the precision of
the numbers is increased to perform the calculation.
• Addition results of positive or negative infinity are handled as follows for real number values.
• If any of the values of In1 to InN is nonnumeric data, the value of Out is nonnumeric data.
• You can add real numbers and integers. If you do, Out is a real number.
• An error will occur in the following cases. ENO will be FALSE, and Out will not change.
• One of In1 to InN does not end in the NULL character when joining strings.
• The size of the joined text string exceeds the valid range of Out when joining strings.
Additional Information
Precautions for Correct Use
Addition Addition result
+∞ plus number +∞
−∞
plus number −∞
+∞
plus +∞ +∞
−∞
plus −∞ −∞
+∞
plus −∞
Nonnumeric
data
LD
abc
‘UV’
‘WX’
‘YZ’
ADD
EN ENO
In1
In2
In3
In1
In2
In3
‘UV’
‘WX’
‘YZ’
‘UVWXYZ’
Out=abc
Text strings joined.

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