The timer value changes on the BCD switches, but the CLICK PLC does not directly turn the X inputs into the DS value the timer needs. On the described arrangement, Y outputs select the switch lines, X inputs read the BCD bits, and the program transfers and converts those bits before using the timer preset.
Check what each switch position puts on the inputs
Before changing ladder logic, compare the physical wiring with the live input status. The described circuit connects two-digit BCD switches between Y001-Y004 and X001-X004, with diodes for isolation. It uses those outputs to scan and those inputs to read the selected bit pattern. The exact selector-to-digit and bit ordering must come from the installed wiring and program; do not infer it from the address ranges alone.
- With the machine in a safe test condition, observe the live status of
Y001-Y004while the scan runs. Identify which output is active in each scan phase. - Set one switch to a known digit and observe
X001-X004during the phase that reads it. Record the observed four-bit pattern and the corresponding switch position. - Repeat for each digit and for both timer settings. Confirm the input pattern changes with the switch, and confirm that the scan selects the intended digit when it is read.
If a selector output never changes, troubleshoot the scan rung or shift-register progression before touching BCD conversion. If the selector changes but the inputs do not follow a known switch setting, inspect the wiring, diode orientation, common connections, and input status before modifying the data path. Do not bridge outputs or force selector bits to make the display appear correct; that can obscure a wiring fault and invalidate the scan.
Check the scan sequence before replacing the logic
The described program uses a shift register to generate an 11-phase clock for scanning the Y outputs, reading the X inputs, converting two values, and triggering scans at a one-second rate. The 11 phases are part of that program’s design, not a universal CLICK PLC scan requirement. Preserve the intended sequence unless the actual rung logic and wiring show that a different sequence is needed.
Watch the phase progression and input sampling together. A correct four-bit value read during the wrong selector phase is still the wrong digit. Likewise, sampling at a time when the intended output is not selected can produce an intermittent or stale preset. Trace each phase from selector output to input read to data-register update. If the scan does not complete or repeat at the intended one-second rate, fix that sequence first; conversion changes will not repair a stalled or mistimed scan.
The common quick fix is to add more math rungs to make individual X bits act as numeric data. That was the initial approach: X inputs enabled math functions that loaded bit values into DS1-DS3, followed by summing those values into another DS register. The revision replaced that low-level subroutine and first math blocks with a packed copy into a DH register followed by a copy to a DS register. Prefer the simpler transfer path when the installed CLICK software supports the required copy operations and the observed bit ordering is correct.
Read one digit with the packed-copy path
For the revised data path, copy X1-X4 as a packed value to DH1, then copy DH1 to a DS register for use by the timer logic. The transfer through DH is a practical bridge between the input bits and the DS data used by the timer. The change removed calls to the BCD-digit subroutine and replaced the first four math blocks; it does not mean the timer can use raw input bits without the required conversion.
- In the CLICK programming software, use the packed-copy operation with the four input bits as the source and
DH1as the destination, as in the revised design. - Use a copy from
DH1to the intended DS register. Confirm that the selected DS register is the one later used for conversion and the timer preset. - Monitor both registers while selecting known switch positions. Confirm that the DH value represents the input pattern and that the DS value receives the same packed data in the intended form.
Do not guess the packed bit order or assume a direct X-to-DS copy is accepted. Verify the operation and data representation in the installed CLICK software and with live register values. If the command rejects the source/destination combination, or the register value does not match the observed input pattern, stop at the transfer boundary and correct that issue before adding conversion math.
Convert the two BCD digits to the timer number
Two decimal BCD digits must be weighted by place value to form an ordinary binary integer. For a two-digit value with a ones digit and a tens digit, calculate timer_value = ones + 10 × tens. The original notation describes this as DSa + 10*DSb; assign DSa and DSb according to the actual digit mapping, not merely the order in which registers appear in the ladder.
After copying the input pattern into DS registers, verify which nibble is the ones digit and which is the tens digit. Test at least one switch setting where the two digits differ, such as a tens digit of 2 and a ones digit of 7, and confirm the computed value is 27. A setting such as 22 cannot expose a swapped-digit error. This is a conversion check, not a claim about the timer’s engineering units; the evidence does not identify whether the preset represents seconds, minutes, or another timer unit. Read the timer instruction’s configured time base and range before using a switch value as a process duration.
Do not feed the packed BCD pattern directly to the timer as though it were already a binary number. BCD stores each decimal digit in a separate four-bit group; its packed bit pattern and the corresponding base-10 integer are different representations. If the value is wrong after the copy but before the multiply-by-ten/add calculation, investigate bit order and digit extraction. If the input digits are right but the calculated integer is wrong, correct the place-value arithmetic.
Reject invalid switch patterns before enabling a timer
A four-bit field has patterns beyond decimal BCD digits 0 through 9. A switch, wiring, or scan fault can therefore produce a bit pattern that is not a valid decimal digit. Check each digit before treating it as a numeric timer setting. If either digit is outside the valid BCD range, inhibit the preset update or use a known safe application value rather than passing an invalid pattern into the timer.
| Observed condition | Likely fault area | Next check |
|---|---|---|
| Y selector phase advances; X bits do not change with the switch | Switch wiring, diode isolation, common path, or input state | Compare the wiring with live X status at each selected phase. |
| X pattern changes, but DH or DS does not | Copy source, destination, or execution condition | Monitor the copy rung and both registers during a known setting. |
| DH and DS match the observed pattern, but timer number is wrong | Digit order, BCD validation, or place-value math | Test different tens and ones digits, then verify ones + 10 × tens. |
| Timer number is right, but elapsed duration is wrong | Timer time base, preset range, or application-unit assumption | Read the configured timer instruction and verify its actual timing behavior. |
| Value updates only sometimes | Scan phase, sampling condition, or register update timing | Trace the selector, sample, copy, and preset update sequence. |
This validation is especially useful where operators can change settings while the scan is running. Update the timer value only from a complete, valid pair of digits; otherwise a scan between digit reads could momentarily combine the new value from one digit with the old value from the other. If the installed program does not already coordinate the pair update, add and test a deliberate update condition rather than assuming the two reads are simultaneous.
Restore scanning and verify the timer input end to end
For the resolving branch—selector scan works, X readings are stable, and the software accepts the packed-copy path—restore the one-second scan sequence and verify from switch position through timer operation. The described example used 18 main-program rungs and a 9-rung subroutine before the revision; rung counts are not a target. The revised approach removes the BCD-digit subroutine calls and first four math blocks, so validate behavior rather than matching the old program’s rung count.
- Record known settings on both switches. Confirm the Y scan selects the intended digit and the corresponding X inputs show the expected pattern.
- Confirm the packed copy places the four input bits in
DH1, then confirm the copy to the selected DS register. - Verify each digit is valid BCD, identify ones and tens, and check the calculated number against
ones + 10 × tens. - Check the timer instruction’s time base and preset range. Apply a known setting and compare the observed timing with the configured units before returning the pump control to normal operation.
- Repeat with different digits, including unequal tens and ones, and observe the scan and timer update over multiple one-second scan triggers.
Keep any temporary workaround—such as the earlier math-rung decode—separate from the permanent program revision. If production requires a temporary restore, label the active logic and do not leave both decode paths able to write the same timer data. Stop testing if the scan is unstable, the BCD inputs are invalid, or timer behavior is inconsistent with the configured time base; do not use an unverified preset to control the pump.
FAQ
What happens if CLICK cannot copy X inputs directly to a DS register?
Use the described intermediate path: packed-copy X1-X4 to DH1, then copy DH1 to a DS register. Verify the source, destination, and live values in the installed CLICK software before relying on the timer preset.
What happens if I add the two BCD digits without multiplying the tens digit?
The result is not the intended two-digit decimal value. Use ones + 10 × tens; for example, digits 7 and 2 represent 27 when 7 is ones and 2 is tens.
What happens if the switch scan reads a digit during the wrong phase?
The PLC can associate an input pattern with the wrong digit or retain a stale value, even when the switch wiring is intact. Stop commissioning if phase-to-digit mapping or timer timing remains unclear, and contact AutomationDirect official support with the CLICK software version, wiring, and monitored X, DH, and DS values.