2-161
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Math Instructions
2
MUL (*)
MUL (*)
The MUL (*) instruction multiplies integers and real numbers.
* 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 MUL (*) 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.
The following example is for when In1 is INT#10, In2 is INT#20 and In3 is INT#30. The value of variable
abc will be INT#6000.
Instruction Name FB/FUN Graphic expression ST expression
MUL (*) Multiplication FUN Out:=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
(@)MUL
EN ENO
In1 Out
:
InN
:
(@)*
EN ENO
In1 Out
:
InN
: