Multiply Integer To Double Integer And Divide Integer To Double Integer - Siemens SIMATIC S7-200 System Manual

Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

Multiply Integer To Double Integer and Divide Integer To Double Integer

L
A
D
EN
F
IN1
B
D
IN2
EN
IN1
IN2
S
MUL
T
L
DIV
221
222 224
These instructions affect the following Special Memory bits: SM1.0 (zero); SM1.1
(overflow); SM1.2 (negative); SM1.3 (divide-by-zero)
If SM1.3 (divide by zero) is set during a divide operation, then 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
IN1, IN2
VW, IW, QW, MW, SW, SMW, LW, AC, AIW, T, C, Constant, *VD,
*AC, *LD
OUT
VD, ID, QD, MD, SMD, SD, LD, AC, *VD, *LD, *AC
S7-200 Programmable Controller System Manual
A5E00066097-02
The Multiply Integer to Double Integer instruction
multiplies two 16-bit integers and produces a 32-bit
MUL
ENO
product.
OUT
OUT
The Divide Integer to Double Integer instruction
divides two 16-bit integers and produces a 32-bit result
consisting of a 16-bit remainder (most-significant) and a
16-bit quotient (least-significant).
DIV
ENO
In the STL Multiply instruction, the least-significant word
(16 bits) of the 32-bit OUT is used as one of the factors.
OUT
OUT
In the STL Divide instruction, the least-significant word
(16 bits) of the 32-bit OUT is used as the dividend.
In LAD and FBD: IN1 IN2 = OUT
IN1, OUT
IN1, OUT
In STL:
Error conditions that set ENO = 0: SM1.1 (overflow),
226
SM1.3 (divide-by-zero), SM4.3 (run-time), 0006 (indirect
address)
Operands
SIMATIC Instructions
IN1 / IN2 = OUT
IN1 OUT = OUT
OUT / IN1 = OUT
INT
DINT
Data Types
9-77

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents