Professional Documents
Culture Documents
12 - Math Operation
12 - Math Operation
MATH OPERATION
SIEMENS
SIMATIC S7 1/12 March 27, 2024
SIEMENS LTD EGYPT 2007
All Rights Reserved
SIEMENS
Objectives
Mathematical Operation
EN The instruction is executed if RLO is =1 at Enable input EN.
IN1, IN2 The value at IN1 is read in as the first address and the value at IN2 as the second.
OUT The result of the mathematical operation is stored at the address at output OUT.
LAD Diagram FBD Diagram STL
ADD_I L MW0
ADD_I
EN ENO MW4 L MW2
EN OUT
MW0 IN1 OUT MW4 +I
MW0 IN1 T MW4
MW2 IN2
MW2 IN2 ENO
SUB_I L MW6
SUB_I L MW8
EN ENO MW10
EN OUT -I
MW6 IN1 OUT MW10 MW6 T MW10
IN1
MW8 IN2 IN2 ENO
MW8
MUL_D L MD12
MUL_D
EN ENO MD18 L MD14
EN OUT *D
MD12 IN1 OUT MD18 MD12 IN1 T MD18
MD14 IN2 IN2 ENO
MD14