Archie
Member
If I interpret this correct, you want to know if more than 1 bit of the bits 0-6 are on, then set bit 10.
I will show you what I consider clever code. I do not recommend this in a production environment because it is not intuitive, but for an academic exercise it is good to see how it works. Also I did not test this on a PLC, so I will not guarantee my code is completely correct.
I will show you what I consider clever code. I do not recommend this in a production environment because it is not intuitive, but for an academic exercise it is good to see how it works. Also I did not test this on a PLC, so I will not guarantee my code is completely correct.