Download Print this page

Multiplication - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

20.2

Multiplication

MUL(_E)
These functions output the product input values ((s1)(s2) ... (s28)).
*1
Ladder diagram, FBD/LD
[Without EN/ENO]
s1
d
s2
*1 The input variable "s" can be changed in the range of 2 to 28.
Setting data
■Descriptions, types, and data types
Argument
Description
EN
Execution condition (TRUE: Execution, FALSE: Stop)
s1(IN1) to s28(IN28)
Input
ENO
Output status (TRUE: Normal, FALSE: Abnormal)
d(MUL(_E))
Output
Processing details
■Operation processing
• These functions multiply the INT, DINT, or REAL type data input to (s1) to (s28) ((s1)(s2) ...(s28)), and output the
operation result from (d) in the same data type as (s).
Ex.
Data type is INT
(s2)
(s1)
100
15
INT
INT
• A value input to (s1) to (s28) is the INT, DINT, or REAL type data value.
• If an underflow occurs in the operation result, the result will be output as follows from (d).
Data type is INT
• Even if underflow or overflow occurs in the
operation result, it is not regarded as an operation
error. "MUL_E" outputs "TRUE" from ENO.
• Even when the operation result exceeds the INT
type data range, the INT type data is output. (The
operation result is the DINT type, however, the
output data is the INT type data with high-order 16
bits deleted.)
• When the operation result exceeds the INT type
data, convert an input value into the DINT type
data by INT_TO_DINT then perform the
operation.
• When the operation result is 0, the zero flag (SM8020) turns on.
[With EN/ENO]
EN
ENO
s1
d
s2
(d)
1500
INT
Data type is DINT
• Even if underflow or overflow occurs in the
operation result, it is not regarded as an
operation error. "MUL_E" outputs "TRUE" from
ENO.
• Even when the operation result exceeds the
DINT type data range, the DINT type data is
output. (The operation result is the 64-bit data,
however, the output data is the DINT type data
with high-order 32 bits deleted.)
• When the operation result exceeds the DINT
type data, convert an input value into the REAL
type data by DINT_TO_REAL then perform the
operation.
*1
Structured text
[Without EN/ENO]
d:=MUL(s1,s2);
[With EN/ENO]
d:=MUL_E(EN,ENO,s1,s2);
Type
Input variable
Input variable
Output variable
Output variable
Data type is REAL
An operation error occurs and an undefined value
is output.
20 ARITHMETIC OPERATION FUNCTIONS
20
Data type
BOOL
ANY_NUM
BOOL
ANY_NUM
989
20.2 Multiplication

Hide quick links:

Advertisement

loading