Hi All,
In siemens S7 is it possible to add the value of a Bool to an interger ie if I am adding 15 intergers together but have a further 2 Bool parameters to add is it possible to add them to the total sum?
Thx
Well a BOOL will either be equal to '1' or '0' so it would be easy enough to just have some Ladder logic to say...
If 'myBOOL' then ADD 1 to 'total' (where 'total' is the sum of your other INTs)
Or something like this in STL...
Code:
A myBOOL
JNB M001
L myTotal
L 1
+I
T myTotal
M001: NOP 0
You would obviously have to make sure it didn't add every scan but something along those lines would work.