2-163
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Math Instructions
2
MulOU (*OU)
MulOU (*OU)
The MulOU (*OU) instruction multiplies integers and real numbers and outputs the result. It also per-
forms an overflow/underflow check.
* 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.
The MulOU (*OU) instruction multiplies between two and five integers and real numbers and outputs
the result. The data types of values to multiply In1 to InN and multiplication result Out can have different
data types. If the multiplication result exceeds the valid range of the data type that includes all of the
data types of In1 to InN, the value of the P_CY system-defined variable (Carry Flag) changes to TRUE.
This indicates that an overflow or an underflow has occurred.
If Out is a real number and an overflow or underflow occurs, the value of Out is positive or negative
infinity. If Out is an integer, only the bits of the multiplication result that fit in the data type of Out are
assigned to Out.
Instruction Name FB/FUN Graphic expression ST expression
MulOU (*OU) Multiplication with
Overflow/Under-
flow Check
FUN Out:=MulOU(In1, ···, InN);
Variables
Name Meaning I/O Description Valid range Unit Default
In1 to InN Values to
multiply
Input Numbers to multiply, N = 2
to 5
Depends on data type.
--- 1*
Out Multiplica-
tion result
Output Multiplication result Depends on data type.
--- ---
Boolean
Bit string 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
In1 to InN OKOKOKOKOKOKOKOKOKOK
Out OKOKOKOKOKOKOKOKOKOK
Function
(@)MulOU
EN ENO
In1 Out
:
InN
:
(@)*OU
EN ENO
In1 Out
:
InN
: