Ask in Siemens S7

R

Thread Starter

reza zardosht

we have a project that designed for siemens s7 300. in our project in program we need to add some member of block to each other. how can i do it
 
D

Daniel Chartier

Hello Reza;

If I understand your question correctly, you want to add 2 data values in a DB. Let's say you have 2 elements defined as integers in DB21, such as DBW2 and DBW34, and you want to read the results in DB22.DBW0:

L DB21.DBW2
L DB21.DBW34
+I
T DB22.DBW0

In FDB or LAD you can use instructions ADD_I for the same results. Note that you can add Integers, Double Integers and Reals (ADD_I, ADD_D, ADD_R).

Hope this helps,
Daniel Chartier
 
Top