Add (+); Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

2 Instruction Descriptions

ADD (+)

The ADD (+) instruction adds integers or real numbers. It also joins text strings.
Instruction
ADD (+)
Addition
Variables
Name
Meaning
In1 to InN
Add values
Out
Output
value
*1 However, you can use more instructions if you use them as operators in an expression, such as result:= val1 + val2 +
val3;. You can use up to 64 instructions in one expression.
*2 If you omit the input parameter that connects to InN, the default value is not applied, and a building error will occur. For
example, if N is 3 and the input parameters that connect to In1 and In2 are omitted, the default values are applied, but if
the input parameter that connects to In3 is omitted, a building error will occur.
Bit strings
In1 to InN
Out
Function
In a ladder diagram, the Add (+) instruction adds between two and five integers or real numbers and
outputs the result to output value Out. In ST, the Add instruction adds two integers or real numbers and
outputs the result to output value Out.
Add values In1 to InN can have different data types. However, use the combination that data types to
include are existed. If they are different, calculations are performed with the data type that includes the
range of all of the data types. For example, if In1 is INT data and In2 is DINT data, calculations are per-
formed with DINT data. Here, the addition result is DINT data.
2-166
Name
FB/FUN
FUN
I/O
Description
Input
Numbers to add
Ladder diagram: N = 2 to 5
*1
ST: N = 2
Output
Output value
OK OK OK OK OK OK OK OK OK OK
OK OK OK OK OK OK OK OK OK OK
Graphic expression
(@)ADD
EN
ENO
In1
Out
:
:
InN
(@)+
EN ENO
In1
Out
:
:
InN
Valid range
Depends on data type.
Depends on data type.
Integers

NY-series Instructions Reference Manual (W560)

ST expression
Out:=In1 + In2;
Unit
Default
0*2
---
---
---
Times, durations, dates,
and text strings
OK
OK

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents