Skeggy...
Are those KW Values absolutely fixed? Can they be adjusted?
Could you possibly adjust the individual devices to develop the following KWs?
1, 2, 4, 8, 10, 20, 40, 80, 100, 200, 400
If so... then that would provide for the easiest, most direct, solution! You would NOT need to maintain any kind of "list" or "look-up table".
If you can do so... each BCD-Digit would correspond to a specific combination of outputs. Notice that I said BCD-Digit... not BCD-Number.
The BCD Number would, of course, represent "hundreds, "tens" and "ones" (from left-to-right). Each BCD-Digit is composed of 4 bits. The valid range for each is 0-9.
Consider the following...
Hundreds Tens Ones
LKJI HGFE DCBA
0000 = 0 0000 = 0 0000 = 0
0001 = 1 0001 = 1 0001 = 1
0010 = 2 0010 = 2 0010 = 2
0011 = 3 0011 = 3 0011 = 3
0100 = 4 0100 = 4 0100 = 4
0101 = 5 0101 = 5 0101 = 5
0110 = 6 0110 = 6 0110 = 6
0111 = 7 0111 = 7 0111 = 7
1000 = 8 1000 = 8 1000 = 8
1001 = 9 1001 = 9 1001 = 9
Where...
A = Y0 = 1KW
B = Y1 = 2KW
C = Y2 = 4KW
D = Y3 = 8KW
E = Y4 = 10KW
F = Y5 = 20KW
G = Y6 = 40KW
H = Y7 = 80KW
I = Y10 = 100KW
J = Y11 = 200KW
K = Y12 = 400KW
L = Y13 = 800KW <<< Theoretical only - not allowed, unless you have the capability.
.
This is nothing more than a binary-weighting scheme which corresponds directly to the BCD Digits. If you see a "3" in the "tens" digit (0011), then you KNOW that "E" (Y4) and "F" (Y5) should be on, and "G" (Y6) and "H" (Y7) should be off. This develops 30KW. The KWs developed under the other BCD-Digit values are added to this.
Assuming that "L", (Y13 = 800KW), is not allowed, you can have a
theoretical maximum of 865KW. If 603KW is your absolute maximum, then you can simply evaluate the BCD Number before activating the change. If the BCD value on the thumb-wheel is greater than 603, then don't allow the change to occur. You should probably have an indicator of some kind to show that the BCD value is valid, or not. If a guy dials in 652KW, then the indicator at the thumb-wheels should go RED, indicating that the number is NOT valid, and will NOT be acted on when the "LOAD" PB is pressed.
By the way... you should probably have two sets of BCD Numbers... one associated with the thumb-wheels, and the other a set of BCD-indicating LEDs which indicate the current configuration. If the new value, on the thumb-wheels, is valid, then after pressing the "LOAD" PB, the LED-BCD display should match the thumb-wheels. In that way, you'll always know what the current configuration is - right at the thumb-wheels.
The LED display should be driven by the actual outputs. Or, you might want to use feed-back directly from the field devices to show what REAL KW is, as opposed to the INTENDED KW.
So... using a 16-bit word,
Combine the BCD Digits into a single 16-bit word.
MSb 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 LSb
| not used | "hundreds" | "tens" | "ones" |
Then... "map" that word to the Outputs...
Bit-00 = Y0
Bit-01 = Y1
Bit-02 = Y2
Bit-03 = Y3
Bit-04 = Y4
Bit-05 = Y5
Bit-06 = Y6
Bit-07 = Y7
Bit-08 = Y10
Bit-09 = Y11
Bit-10 = Y12
.
At the same time, map those outputs to the LED BCD-Display.