sczot Posted January 25, 2021 Report Posted January 25, 2021 Hello guys, I´m unable to find instruction which would return how many bits are ON in word (like 1 for 2, 4, 8... 2 for 3, 5, 9 etc..) I was searching through manuals, but without any result... Maybe wrong keywords, maybe to many hours today.. Thanks in advance
Lambir Posted January 25, 2021 Report Posted January 25, 2021 If it is for FX PLCs, the instruction SUM should do it (FNC 43 – SUM / Sum of Active Bits - this instruction counts the number of "1" (ON) bits in the data of a specified device). Or DSUM for 32 bits. 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now