Sid Posted January 6, 2010 Share Posted January 6, 2010 Hi I have a stupid question.. I'm trying to sum up some bits (to see how many are active) and I got into some sort of a problem, you'll probably have no problem with.. When I paste the following into the watch monitor it works (from.Bit(bit1)+from.Bit(bit2)+from.Bit(bit3) +from.Bit(bit4)+ From.Bit(bit5)+From.Bit(bit6)) I get a nice number of active bits.. but when I put the code in a sequence and assign it to a global variable it does not work.. test=(from.Bit(bit1)+from.Bit(bit2)+from.Bit(bit3) +from.Bit(bit4)+From.Bit(bit5)+From.Bit(bit6)) Strange numbers appear.. What do you think could be the problem or am I handling it wrong and should do it another way? thank you! Link to comment Share on other sites More sharing options...
AzeoTech Posted January 7, 2010 Share Posted January 7, 2010 why are you using from.bit()? What does bit1, bit2, bit3, etc. contain? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.