In my SLC 504 programs, I have used the FBC instruction to scan a word for a bit that has been set. This instruction is not supported in the micrologix 1500. I need to create an FBC instruction in a mocrologix 1500 system.
Maybe copy the word to a temporary register, then examine temp_reg.0 for true, if not loop through 15 times, each time dividing the word by 2 (shift right) and examine again temp_reg.0 for true.
Or perhaps, use a bit-shift?
For a quick way of seeing if any bit is set, just compare the word to zero. Not equal means at least one bit is set somewhere.