Concatenating Integer variables

Thanks for the valuable replies all. GoForSmoke that link you shared is interesting and critical to what I'm doing.

The datasheet for the encoder I'm using is attached. Yes it's old, and it is 24vdc. All of its outputs I've brought down to LVTTL using voltage dividers for interfacing. Bit5 is not used for the 8 position version. Strobe is essentially a qualifier for every position, so if its HIGH we are actually in ONE of the eight positions. Parity check is not needed, and was never actually wired up on the old controller.

The truth table for the 8 positions is also attached.

johnwasser:
You have the logic wrong. To check for inequality you want to see if ANY bit does not match. By using AND instead of OR you are getting 'true' only when EVERY bit does not match. Change && to ||.

Thanks John, that makes sense, I'll try changing to OR tomorrow and post the results.

Encoder.pdf (548 KB)

EncPos.png