EasyManuals Logo

Siemens Simatic S7 Series System Manual

Siemens Simatic S7 Series
726 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 #262 background imageLoading...
Page #262 background image
Program instructions
7.8 Math
S7-200 SMART
262 System Manual, 09/2015, A5E03822230-AC
7.8.2
Multiply integer to double integer and divide integer with remainder
LAD / FBD
STL
Description
MUL IN1, OUT
The multiply integer to double Integer instruction multiplies two 16-bit integers and
produces a 32-bit product.
In STL, the least-significant word (16 bits) of the 32-bit OUT is used as one of the
factors.
LAD and FBD: IN1 * IN2 = OUT
STL: IN1 * OUT = OUT
DIV IN1, OUT
The divide integer with remainder instruction divides two 16-bit integers and pro-
duces a 32-bit result consisting of a 16-bit remainder (the most-significant word) and
a 16-bit quotient (the least-significant word).
In STL, the least-significant word (16 bits) of the 32-bit OUT is used as the dividend.
LAD and FBD: IN1 / IN2 = OUT
STL: OUT / IN1 = OUT
Non-fatal errors with ENO=0
SM bits affected
1
0006H Indirect address
SM1.1 Overflow
SM1.3 Divide by zero
SM1.0 Result of operation = zero
SM1.1 Overflow, illegal value generated during the operation, or illegal input
SM1.2 Negative result
SM1.3 Divide by zero
1
For both of these instructions, SM bits indicate errors and illegal values. If SM1.3 (divide by zero) is set during a divide
operation, then the other math status bits are left unchanged. Otherwise, all supported math status bits contain valid
status upon completion of the math operation.
Input / output
Data type
Operand
IN1, IN2
INT
IW, QW, VW, MW, SMW, SW, T, C, LW, AC, AIW, *VD, *LD, *AC, Constant
OUT
DINT
ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *LD, *AC

Table of Contents

Other manuals for Siemens Simatic S7 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens Simatic S7 Series and is the answer not in the manual?

Siemens Simatic S7 Series Specifications

General IconGeneral
CPUVaries by model (e.g., S7-300, S7-400, S7-1200, S7-1500)
Communication InterfacesPROFIBUS, PROFINET, Ethernet, MPI
ProgrammingTIA Portal, STEP 7
Programming LanguagesLAD, FBD, STL, SCL, GRAPH
I/O ModulesDigital, Analog, Specialty modules available
Operating Temperature0°C to 60°C (standard models)
MountingDIN rail mounting
Operating Voltage24V DC or 120/230V AC (varies by model)
Protection ClassIP20 (standard models)
MemoryVaries depending on the S7 model. Includes work memory (RAM) for program execution, load memory (EEPROM or Flash) for program storage, and system memory for operating system functions. Memory sizes range from kilobytes to megabytes.

Related product manuals