SIEMENS
MATH OPERATION
SIEMENS
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved
1/12
August 21, 2013
SIEMENS
Objectives
- Understand The Math Operation & How To Use It In Different Language.
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved
2/12
August 21, 2013
SIEMENS
Mathematical Operation
EN
IN1, IN2 OUT
The instruction is executed if RLO is =1 at Enable input EN.
The value at IN1 is read in as the first address and the value at IN2 as the second. The result of the mathematical operation is stored at the address at output OUT.
LAD Diagram
ADD_I EN ENO IN1 OUT IN2
FBD Diagram
STL
L L +I T MW0 MW2 MW4
MW0 MW2
MW4
MW0 MW2
ADD_I EN OUT IN1 IN2 ENO
MW4
SUB_I EN MW6 MW8 IN1 IN2 MUL_D EN ENO MD12 MD14 IN1 IN2 OUT MD18 MD12 MD14 ENO OUT MW10
MW6
MW8
SUB_I EN OUT IN1 IN2 ENO
MW10
L L -I T
MW6 MW8
MW10
MUL_D EN OUT
IN1 IN2 ENO
MD18
L L *D T
MD12 MD14 MD18
MD22 MD26
DIV_R EN ENO IN1 OUT IN2
MD30
MD22 MD26
DIV_R EN OUT IN1 IN2 ENO
MD30
L L /R T
MD22 MD26 MD32
SIMATIC S7
SIEMENS LTD EGYPT 2007 All Rights Reserved
3/12
August 21, 2013