Use MOV K1X0 D100 to pack inputs X0 through X3 into the low four bits of D100. K1 selects one four-bit input group, with X0 as the least-significant bit. No intermediate OUT coils are required. When the thumbwheel produces a valid active-high BCD digit, D100 will contain the corresponding value from 0 through 9.
Input Pattern Behind the Symptom
A four-line thumbwheel does not deliver a word directly. It switches current through four PLC input circuits, and the PLC exposes their states as four individual bits. The number that matters is the bit pattern present when the program executes the transfer.
For an active-high switch, the packed value is:
D100 = X0 × 1 + X1 × 2 + X2 × 4 + X3 × 8
| Quantity | Meaning | Where to read it |
|---|---|---|
X0 |
Bit weight 1 | PLC input monitor or input indicator |
X1 |
Bit weight 2 | PLC input monitor or input indicator |
X2 |
Bit weight 4 | PLC input monitor or input indicator |
X3 |
Bit weight 8 | PLC input monitor or input indicator |
K1X0 |
One packed group of four consecutive bits starting at X0
|
Instruction source operand |
D100 |
Destination word containing the packed value | Device monitor |
The physical current and voltage must match the PLC input specification and the switch wiring arrangement. Read the input rating and common-terminal arrangement from the exact FX CPU or input-module documentation before energizing the circuit. Applying an incompatible voltage or wiring the input common incorrectly can damage the input circuit.
Packed-Nibble Mechanism
K1X0 is a grouped bit-device operand. The K1 prefix means one group of four bits, and X0 identifies the first bit. The MOV instruction copies that packed nibble into the destination word during the scan.
| Thumbwheel digit | X3 X2 X1 X0 |
Value moved to D100
|
|---|---|---|
| 0 | 0000 |
0 |
| 1 | 0001 |
1 |
| 5 | 0101 |
5 |
| 9 | 1001 |
9 |
For a single decimal digit, valid BCD and binary values have the same numerical representation from 0 through 9. Patterns 1010 through 1111 produce values 10 through 15, but they are not valid single-digit BCD. Treat those states as wiring faults, transition states, or an indication that the switch uses a different output code.
An active-low switch reverses the electrical interpretation: an asserted output may appear as an OFF input. Determine polarity by measuring the terminals and observing the monitored X states at known dial positions. Correct the wiring or normalize the bits before treating the packed result as a digit.
Pre-Transfer Diagnostic Checks
- Disconnect power and compare the switch terminal diagram with the input common arrangement documented for the installed PLC or input module.
- Confirm that the switch has four weighted outputs corresponding to 1, 2, 4, and 8. A different coding scheme will not produce the expected value when packed directly.
- Restore power and monitor
X0,X1,X2, andX3without running the transfer. Select known digits and compare the observed patterns with the table above. - Check the bit order. If a displayed 1 activates
X3instead ofX0, the conductors are reversed relative to the required weights. - Turn the wheel slowly between positions while watching the inputs. Mechanical contacts can change at different instants, so intermediate patterns may appear during motion.
If the input indicators respond but the monitored devices do not, investigate the selected PLC, I/O assignment, and online connection. If neither responds, measure the field voltage at each input relative to its common and correct the electrical circuit before changing the program.
Transfer Procedure
- Wire the four weighted outputs so the 1, 2, 4, and 8 lines operate
X0,X1,X2, andX3, respectively. - Insert the packed transfer instruction in the logic that acquires the operator setting:
MOV K1X0 D100
- Decide when the value may be accepted. A continuously executed transfer makes
D100follow every scanned contact pattern, including patterns that occur while the wheel is between positions. - If the downstream process must use a stable setting, accept the value only after the dial is stationary or on a separate confirmation event. Use the installed input response settings and measured switch behavior to establish any required settling logic; no fixed settling time applies to every switch and FX configuration.
- Reject values above 9 when the device represents one BCD digit.
- Use
D100as the source for later processing. Keep the arithmetic representation consistent: ordinary numerical calculations can use the 0-to-9 value directly, while a BCD-oriented sequence must preserve valid BCD digits or perform the required BCD, binary, or floating-point conversion at its interface.
Verification at D100
Monitor the four inputs and D100 simultaneously. Test at least 0, 1, 5, and 9 because those positions exercise zero, single-bit, mixed-bit, and high-bit patterns.
| Observation | Likely cause | Correction |
|---|---|---|
D100 never changes |
MOV is not being executed, or inputs remain OFF |
Monitor rung execution and the individual inputs |
| Values have incorrect weights | 1, 2, 4, and 8 conductors are out of order | Match each conductor to its intended input bit |
| Values appear inverted | Switch polarity or common arrangement differs from the assumed active-high mapping | Measure terminal states and correct or normalize the mapping |
| Values above 9 appear while stationary | Invalid BCD pattern, wiring fault, or incompatible switch coding | Compare every input against the switch terminal diagram |
| Brief wrong values appear during adjustment | Contacts change across different PLC scans | Latch the setting after a stable or confirmed selection |
Verification is complete when every tested dial position produces the correct four input states, the same numerical value appears in D100, and downstream logic accepts only stable values from 0 through 9.
Recurring Thumbwheel Input Pitfalls
The most common mistake is recreating an application from another PLC by assigning each input to a separate holding bit. Mitsubishi grouped-device syntax already packs consecutive inputs, so four intermediate coils add logic without changing the underlying data.
A second mistake is calling every packed nibble BCD. The storage operation does not validate decimal coding; it copies four bits. The result is a valid single BCD digit only when the switch supplies the expected weighted code and the value remains between 0 and 9.
Contact transition timing can also corrupt a setting that is sampled continuously. This is a scan-timing problem: the CPU may read a physically valid but unintended intermediate combination. A confirmation input, stable-value test, or machine-state interlock prevents the process from acting while the operator turns the wheel.
Finally, keep address allocation tied to the documentation for the installed FX hardware. X0 through X3 are consecutive for this four-bit group, but extensions to additional digits must follow the platform's valid input-address sequence rather than an assumed numbering pattern.
FAQ
How do I move Mitsubishi FX inputs X0 through X3 into a data register?
Execute MOV K1X0 D100. It packs the four consecutive inputs into the low four bits of D100, with X0 carrying weight 1 and X3 carrying weight 8.
How do I check whether the thumbwheel value in D100 is valid BCD?
Accept values 0 through 9 for a single BCD digit. A stationary value from 10 through 15 indicates an invalid digit pattern, incorrect bit order, incompatible coding, or a field-wiring problem.
When should I stop troubleshooting the Mitsubishi FX thumbwheel input?
Stop if the measured field voltage conflicts with the installed input rating, or if the input indicators and monitored X states disagree after the wiring and online connection are verified. Record the CPU or module identification, wiring diagram, measured voltages, input states, and D100 values, then escalate to official Mitsubishi support.