ISL_MAN Member I Join Date Aug 2005 Location rOTHERHAM Posts 20 Nov 12, 2005 #1 I'm having a mental block this morning. Want to do something very simple. I've got a number of enable bits in a byte and I've got a real which I want to display the number of bits set in this byte. I'm trying to do this in S7 300 Ladder logic.
I'm having a mental block this morning. Want to do something very simple. I've got a number of enable bits in a byte and I've got a real which I want to display the number of bits set in this byte. I'm trying to do this in S7 300 Ladder logic.
krk Lifetime Supporting Member K Join Date Aug 2004 Location Kent Posts 795 Nov 12, 2005 #2 If it must be ladder then here you go... (but you'll find the code becomes much more compact/elegant if you learn to use STL)
If it must be ladder then here you go... (but you'll find the code becomes much more compact/elegant if you learn to use STL)
Amr Hassan Member A Join Date May 2005 Posts 340 Nov 14, 2005 #3 u can use the function in ti library called bitsum which will do the same function (fc99)
PLucas Member Join Date Apr 2002 Location Gillingham Kent Posts 1,742 Nov 14, 2005 #4 Amr Hassan said: u can use the function in ti library called bitsum which will do the same function (fc99) Click to expand... Yep, that's what Kevin used in his example. Paul
Amr Hassan said: u can use the function in ti library called bitsum which will do the same function (fc99) Click to expand... Yep, that's what Kevin used in his example. Paul