IMDHMIControls LibraryShop main store

Troubleshooting

SLC 5/03 pulse sequence logic will not run

PLC programming Published 7 min read

Short answer

Your sequence logic is probably fine: the ladder file holding it is never called from File 2, and green highlighting on both OTL and OTU shows the bit's state, not that both rungs execute. Call the file, one-shot I:8.78 with OSR, latch a sequence bit, and clear it only after the last pulse on O:7.4.

On this page
  1. Confirm the processor executes the file
  2. What the green highlighting is telling you
  3. Why the short delay works and the long one fails
  4. Order of writes within one scan
  5. Structure it as one sequence
  6. Working a three-pulse burst on O:7.4 from trigger I:8.78
  7. Test it without blaming the timers
  8. Questions asked

When an SLC 5/03 pulse sequence does nothing while every rung looks right, check execution before you check logic. In the case this article works through, the sequence lived in a ladder file that File 2, the main program, never called, so the processor never executed one instruction of it. The second observation, the latch and unlatch "both on" at once, is a display effect, not a logic fault: green highlighting in RSLogix 500 shows the addressed bit's current state, not that the instruction ran. The repair covers all of it: call the file every scan, one-shot the encoder trigger I:8.78 with OSR, latch a sequence-active bit on that edge, and clear it only after the last pulse on O:7.4 finishes.

Confirm the processor executes the file #

The processor scans File 2 every scan. Every other ladder file executes only on scans where a JSR instruction calls it, and rungs that look perfect in an uncalled file do exactly nothing. A routine nobody calls is the classic cause of "the logic looks fine but does not seem to work at all."

Work through these checks in order:

  1. Record the processor mode and any fault code held in S:6 before clearing anything, and open the forces table. The SLC modular hardware user manual treats mode, faults, and forces as troubleshooting branches separate from program logic.
  2. Identify the file number that holds the pulse sequence and its timing logic.
  3. In File 2, search the project for a JSR referencing that file number, and read every condition in front of it.
  4. Either move the sequence into File 2 or make the JSR unconditional, so the file is scanned for the whole machine cycle.

Keep the call active through the entire sequence. A file that stops being called mid-sequence is not the same as a scanned file with false rung conditions: skipped instructions do no rung processing at all, so a disappearing call is never a clean way to stop or reset your sequence.

What the green highlighting is telling you #

The SLC 500 instruction set reference manual (1747-RM001) separates bit tests from output instructions: XIC is true when its addressed bit is 1, XIO is true when the bit is 0, and OTL and OTU set or clear a retentive bit when their rung conditions are true. RSLogix 500 highlights an instruction from the state of what it addresses, so OTL and OTU referencing the same bit show the same color whenever that bit is 1. That is one fact about the bit, not two facts about two rungs.

What you see What it usually means Deciding check
OTL and OTU both green The addressed bit is 1; highlighting does not show execution Make each rung's conditions true one at a time and watch the bit change
Rungs look correct, output never fires The file is not on an executed path Trace the JSR from File 2
Short delay works, long delay never completes The delay rung is level-sensitive and resets Watch the timer accumulator against the raw input
First pulse a different width than the rest Pulses timed from a flash bit shared with other logic Compare sequence entry with the flash bit's current phase

Why the short delay works and the long one fails #

A TON accumulates only while its rung conditions are true, and it resets when they go false. If the delay rung is conditioned directly on the encoder input as a level, the delay accumulates only while I:8.78 stays high. A short preset finishes inside the encoder's high time; a longer preset never gets there before the level drops and the accumulator resets to zero. The timer is doing exactly what it was told.

The encoder signal is an event, not a permission to run every stage. The instruction set reference describes OSR as producing a one-scan true output on a false-to-true transition, which is the tool for turning that event into one request. Feed the OSR output to the start logic, not the raw level.

Order of writes within one scan #

The processor evaluates rungs top to bottom, in program order. When the latch rung and the unlatch rung are both true in the same scan, the instruction executed later leaves the bit in its state: an unlatch placed below the latch leaves the bit 0 no matter what the latch wrote. The page on why both rungs execute on one input walks through this scan-order behavior in detail.

Reordering the rungs is not the repair; it only changes which competing write wins. The repair is mutual exclusion: accept a start only when the sequence is idle, and clear the busy bit only when the sequence is complete. Once those two conditions cannot be true together, rung order stops mattering.

Structure it as one sequence #

Treat the operation as one sequence with stages rather than a set of independent timer rungs:

  • Idle — pulse command off; a rising edge on the encoder is accepted only when no sequence is active.
  • Initial delay — sequence-active latched on; the delay timer runs from that maintained bit, and the encoder input is ignored.
  • Pulse on — output commanded on, on-interval timed.
  • Pulse off — output off, one completed pulse counted, the gap timed.
  • Complete — after the final on-interval ends and the selected count is reached, output off, sequence-active cleared.

Three rules hold it together. Latch the sequence-active bit when you accept the edge and clear it only when the last pulse has finished, never merely because the delay is done. Count one pulse per completed on-interval, not one per scan the output stays on. Time the pulses with timers that belong to this sequence, not a flash bit shared with other logic, or the sequence can enter mid-flash and the first pulse comes out the wrong width. For bigger machines this accept-and-run pattern grows into a table-driven sequencer program, and the latch-and-clear core is the same one used to latch two level inputs for pump start and stop control.

Resolve "three or four pulses" into one definite number before commissioning; a count that changes on site is a program change, not a setting.

Working a three-pulse burst on O:7.4 from trigger I:8.78 #

Inputs, each with its source:

  • Trigger: input I:8.78 as addressed in this project. Confirm the complete bit address against the I/O configuration first, because an element address and a bit address are different things.
  • Output: O:7.4, confirmed the same way.
  • Pulse count: 3, the lower of the two counts this application calls for.
  • Typical scan time: 1 ms per 1 K of simple ladder logic, from the SLC 5/03 modular processors' installation instructions (1747-IN009).

The rule in words: one rising edge produces one true OSR scan; the busy bit blocks every further edge; each completed on-interval counts exactly one pulse; the busy bit clears once, after the third on-interval ends.

The arithmetic:

  • One encoder event = 1 false-to-true transition = 1 OSR scan = 1 accepted start.
  • Without the OSR and busy gate, the raw level requests a start on every scan it is high: 1 s = 1000 ms, and 1000 ms ÷ 1 ms per scan = 1000 start requests in each second of encoder high. Every request that lands mid-sequence restarts the delay.
  • 3 pulses = 3 on-intervals plus 3 − 1 = 2 between-gaps, so the counter preset is 3 and the gap timer runs twice.
  • Busy bit set once, cleared once: on-interval 3 ends, counter done, output off, busy off.

Decision: if your start rung can be true for more than one scan per encoder event, or if anything can clear the busy bit before the third on-interval has finished, this arithmetic collapses into repeated restarts. Rebuild the start as an OSR edge into a busy latch before you touch a single timer preset.

Test it without blaming the timers #

Do the first tests with the machine isolated: the corrected sequence fires O:7.4 three times in rapid succession right after the delay, and whatever that output drives must be ready for that.

Then watch three things together: the sequence-active bit, the delay timer's accumulator, and the pulse counter. A bit that stays on is not evidence the routine is executing; a called file with false rungs looks the same. Before judging timing accuracy, note that the typical scan time cited above bounds a scanned timer's done bit to within about one scan of its preset, which cannot explain a delay that never completes. A delay that resets is a start-condition problem. Cross-reference every instruction that writes the busy bit and O:7.4, and clear the forces table: an output that disagrees with its rung almost always has a force or a second write behind it.

Questions asked

Why do the latch and the unlatch both show green in RSLogix 500?

Highlighting shows the current state of the bit an instruction addresses. OTL and OTU that reference the same bit display the same color whenever that bit is 1, whether or not either rung's conditions are actually true. It is one fact about the bit, not proof that both rungs executed. To check execution, make each rung's conditions true one at a time and watch the bit change, and confirm the file is on a called path.

How do I run a ladder file that is not File 2?

The processor scans File 2 every scan and executes another file only where a JSR calls it. Put a JSR with the file number in File 2 and leave it unconditional, so the pulse routine is scanned for the whole machine cycle. The SLC 5/03 and higher processors support nested subroutine files through JSR, SBR, and RET, so the sequence can live in its own file.

Should I move the unlatch rung above the latch rung?

Only as a last resort. Rungs execute top to bottom, so when both conditions are true in one scan the later instruction decides the bit's final state, and reordering just changes which write wins. The real repair is mutual exclusion: gate the start with the idle state, and clear the busy bit only when the last pulse is done. With those conditions, either rung order gives the same result.

Are SLC 500 timers too inaccurate for a pulse train?

No. The SLC 5/03 installation instructions give a typical scan of 1 ms per 1 K of simple ladder logic, so a scanned timer's done bit appears within about one scan of its preset being reached, millisecond order rather than chaos. What looks like timer failure here is a delay rung that resets every time the encoder level drops, or a routine that stops being called.

What does OSR do that a plain contact cannot?

OSR is true for exactly one scan on each false-to-true transition of its input. A plain contact is true for every scan the encoder stays high, which at the documented typical scan is about 1000 scans per second of high signal, each one a fresh start request. The OSR turns the encoder event into one request, and a latched busy bit then refuses every request until the sequence finishes.

Keep reading

  • Troubleshooting

    Start a PID ramp soak profile from ladder logic

    The profile never starts from ladder because the JMP stage handoff leaves the old stage on for three more scans, which swallows the one-scan PD pulse that must set the ramp/soak start bit. Replace the jump with SET and RST stage logic, then verify bit 11, the +33 octal control word and the +35 error flags before touching the PID instruction or table values.

    PLC programming

  • Troubleshooting

    When a CODESYS TON works in structured text but not ladder

    The structured text routine counts because its four statements run in sequence inside one scan; the ladder version fails when the reset network clears Timer.Q before the addition samples it, or an unconditional reset restarts the timer every cycle. Put the call, the Q test, the addition and the reset of the same TON instance in one ladder network, left to right in that order, and it counts exactly one B per interval.

    PLC programming

  • How-to

    Latch two level inputs for pump start and stop control

    Use one reset-dominant latch: set the pump when the low level probe reads dry and reset it when the high probe reads wet, so the pump holds its state between the probes. A rung that only compares the inputs drops out the moment water covers the low probe; the latch turns the probe spacing into hysteresis.

    PLC programming