Multiply Real, Divide Real - Siemens SIMATIC S7-200 System Manual

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

Advertisement

Multiply Real, Divide Real

L
A
D
EN
F
IN1
B
D
IN2
EN
IN1
IN2
S
*R
T
L
/R
221
222
If SM1.3 is set during a divide operation, then the other math status bits are left
unchanged and the original input operands are not altered. SM1.1 is used to
indicate overflow errors and illegal values. If SM1.1 is set, then the status of SM1.0
and SM1.2 is not valid and the original input operands are not altered. If SM1.1
and SM1.3 (during a divide operation) are not set, then the math operation has
completed with a valid result and SM1.0 and SM1.2 contain valid status.
Inputs/Outputs
IN1, IN2
VD, ID, QD, MD, SMD, SD, LD, AC, Constant, *VD, *AC, *LD
OUT
VD, ID, QD, MD, SMD, SD, LD, AC, *VD, *AC, *LD
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.
S7-200 Programmable Controller System Manual
A5E00066097-02
The Multiply Real instruction multiplies two 32-bit real
numbers, and produces a 32-bit real number result
MUL_R
ENO
(OUT).
The Divide Real instruction divides two 32-bit real
OUT
OUT
numbers, and produces a 32-bit real number quotient.
In LAD and FBD:
DIV_R
ENO
In STL:
OUT
OUT
Error conditions that set ENO = 0: SM1.1 (overflow),
SM1.3 (divide-by-zero), SM4.3 (run-time), 0006 (indirect
address)
IN1, OUT
These instructions affect the following Special Memory
IN1, OUT
bits: SM1.0 (zero); SM1.1 (overflow or illegal value
generated during the operation or illegal input parameter
found); SM1.2 (negative); SM1.3 (divide-by-zero)
224
226
Operands
SIMATIC Instructions
IN1 IN2 = OUT
IN1/ IN2 = OUT
IN1 OUT = OUT
OUT / IN1 = OUT
Data Types
REAL
REAL
9-83

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents