Bit Difference
easy
Outputs a word whose bits are set only where the command and feedback words disagree.
What it teaches
Bitwise XOR compares two packed words and marks every disagreement — the readback check that tells maintenance which channel of an output card failed to do what it was told. Unlike a single-BOOL exclusive-OR, each of the 32 bit positions is compared independently.
Inputs and outputs
| Tag | Type | Default | Description |
|---|---|---|---|
| In_Command | DINT | 5 | Commanded output word |
| In_Feedback | DINT | 3 | Confirmed feedback word |
| Out_Mismatch | DINT | — | 1 bits mark the channels that disagree |
Required behavior
- Each bit of Out_Mismatch is 1 exactly where In_Command and In_Feedback have different bits.
- Out_Mismatch is 0 when the two words match.
- All 32 bits are compared, including the sign bit.