EasyManuals Logo

Mitsubishi MELSEC System Q User Manual

Mitsubishi MELSEC System Q
170 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #161 background imageLoading...
Page #161 background image
6.4.3 Multiplication
The "MUL" instruction multiplies two 16-bit or 32-bit values and writes the result to a third
device.
Multiplicand
Multiplier
Product (result of the multiplication, multiplicand x multiplier = product)
The example above multiplies the contents of D1 and D2 and writes the result to D3.
NOTE The data types of the input and output variable of the MUL instruction must be identical.
When the result of the multiplication exceeds the value range for 16-bit or 32-bit variables the
most significant bits get lost and the product is not correct. When 16-bit values are to be mul
-
tiplied they can be copied into 32-bit variables as described for the ADD instruction (see
chapter 6.4.1). The MUL instruction is then performed with these 32-bit variables and the re-
sult will be correct.
For a MUL instruction up to 28 input variables can be defined. The setting is similar to the ADD
instruction (see chapter 6.4.1).
Examples
Multiply the contents of D1 and D2 and store the product in D3:
The signs of the values are taken into account by the MUL instruction. In this example the value
in D10 is multiplied by the constant value -5:
MELSEC System Q Beginners Manual 6 29
More Advanced Programming Math Instructions
Ladder Diagram
IEC Instruction List
LD D1
MUL D2
ST D3
144
17
D 1
x
D 3
D2
2448
8
-5
D 10
x
D 20
-40

Table of Contents

Other manuals for Mitsubishi MELSEC System Q

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC System Q and is the answer not in the manual?

Mitsubishi MELSEC System Q Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC System Q
CategoryController
LanguageEnglish

Related product manuals