Subou (-Ou) - Omron NY532-5400 Reference Manual

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

Advertisement

SubOU (-OU)

The SubOU (-OU) instruction subtracts integers or real numbers. It also performs an overflow check for
integer subtraction result.
Instruction
SubOU (-OU)
Subtraction with
Overflow Check
Variables
Name
Meaning
In1
Minuend
In2
Subtrahend
Out
Output
value
* If you omit an input parameter, the default value is not applied. A building error will occur.
Bit strings
In1
In2
Out
* If In1 or In2 is REAL data, an overflow check is not performed.
Function
The SubOU (-OU) instruction subtracts subtrahend In2 from minuend In1 and outputs the result to out-
put value Out.
In1 and In2 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 performed with
DINT data. Here, the subtraction result is DINT data.
Refer to Data Type Ranking Table and Casting Rules in the NJ/NX-series CPU Unit Software User's
Manual (Cat. No. W501) or NY-series Industrial Panel PC / Industrial Box PC Software User's Manual
(Cat. No. W558) for the including relationship on data types.
NY-series Instructions Reference Manual (W560)
Name
FB/FUN
FUN
I/O
Description
Minuend
Input
Subtrahend
Output
Output value
OK OK OK OK OK OK OK OK OK * OK *
OK OK OK OK OK OK OK OK OK * OK *
OK OK OK OK OK OK OK OK
Graphic expression
(@)SubOU
EN
ENO
In1
Out
In2
(@)-OU
EN
ENO
In1
Out
In2
Valid range
Depends on data type.
Depends on data type.
Integers
2 Instruction Descriptions
ST expression
Out:=SubOU(In1, In2);
Unit
Default
---
0*
---
---
Times, durations,
dates, and text
strings
OK
OK
2
2-177

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents