Galaniz
Member
I am using Siemens Step 7 with an S7-400 Procesor. I am looking for a sleek way to count a number of bits and store the result as an integer.
My specific application requires me to know the number of valves open without error. Each valve open without error will provide a bit indicating such. I would like to take all the bits (9 in this case) and determine if 2 or more are open.
I can do this in 45 wrungs by placing all the combinations in pairs in series, but surely there must be a better way.
Any Ideas?
My specific application requires me to know the number of valves open without error. Each valve open without error will provide a bit indicating such. I would like to take all the bits (9 in this case) and determine if 2 or more are open.
I can do this in 45 wrungs by placing all the combinations in pairs in series, but surely there must be a better way.
Any Ideas?