Specifications
IEC 1131-3 Instructions
10-20
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
Multiply, Divide
The Multiply function multiplies IN1 and IN2 and places
the result in the variable specified by OUT.
The Divide function divides IN1 by IN2 and places the
result in the variable specified by OUT.
The input and output data types can vary, but must be of
the same type. For example, the product of multiplying
two 16-bit variables must be placed in a 16-bit variable,
the product of multiplying two 32-bit variables must be
placed in a 32-bit variable.
In LAD: IN1<IN2 = OUT
IN1 / IN2 = OUT
Error conditions that set ENO = 0: SM1.1 (overflow),
SM1.3 (divide-by-zero), SM4.3 (run-time), 0006 (indirect
address)
These functions affect the following Special Memory bits: SM1.0 (zero); SM1.1
(overflow); SM1.2 (negative); SM1.3 (divide-by-zero)
If SM1.1 (overflow bit) is set, then the other math status bits are cleared and the
output operand is not altered. For integer operations, if SM1.3 is set during a divide
operation, the other math status bits are left unchanged and the original input
operands are not altered. Otherwise, all supported math status bits contain valid
status upon completion of the math operation.
Inputs/Outputs Operands Data Types
IN1, IN2 VW, IW, QW, MW, SW, SMW, LW, AIW, T, C, VD, ID, QD, MD,
SMD, SD, LD, HC, AC, Constant, *VD, *AC, *LD
INT, DINT, REAL
OUT VW, IW, QW, MW, SW, SMW, T, C, LW, VD, ID, QD, MD, SMD,
SD, LD, AC, *VD, *AC, *LD
INT, DINT, REAL
Note
Real or floating-point numbers are represented in the format described in the
ANSI/IEEE 754-1985 standard (single-precision). Refer to the standard for more
information.
L
A
D
F
B
D
OUT
MUL
EN
IN1
IN2
OUT
OUT
DIV
EN
IN1
IN2
OUT
ENO
ENO
222 224
333
221