Module 7 — PLC, Controls & Automation · LEO Technical Academy
Lesson 7.5 — Advanced Ladder Instructions: Timers, Counters, Math, and Compare Lines
Level 3 (2–3+ Years Experience) 🖥 Controls ⏱ 55 min Advanced LEO-ACE-07-005 v1.0 · 2026-11-02
📌 Training Use Only
This lesson builds knowledge. Completing it does not authorize field work, equipment servicing, LOTO, energized testing, or customer-site activity. Site rules, your supervisor, and required LEO Safety Training govern all work. Stop-Work Authority is absolute.
§01 — Learning Objectives

Learning Objectives

By the end of this lesson, the technician will be able to:

§02 — Field Scenario

Field Scenario

The Pump That Faulted Every Morning — at Exactly the Same Second: A transfer pump faults on "LOW FLOW" every morning during first start, then runs perfectly all day after a reset. The night crew has started "double-starting" it as a ritual. The work order suggests replacing the flow switch.

In monitor mode, you find the fault rung: the pump run command starts a TON (on-delay timer) with a preset of 3.0 seconds; if the timer's DN (done) bit comes up while the flow-proven input is still false, the fault latches. The logic is sound: start the pump, give the line 3 seconds to establish flow, fault if it never proves.

You watch a morning start with the timer on screen. The flow switch makes at 3.4 seconds — every time. Then an afternoon start: flow proves at 1.9 seconds. The flow switch isn't failing; the process changed. Maintenance records show the line was repiped two months ago with a longer run and a check valve — a cold, empty line now takes ~3.5 seconds to fill before flow can prove. The 3.0-second allowance was calibrated to plumbing that no longer exists.

The finding goes to the controls engineer with data: preset 3.0 s, measured cold-fill flow-proof time 3.4 s, warm 1.9 s. Engineering changes the preset to 5.0 s through the site's change process — the technician's job was the diagnosis, and the diagnosis was a number. No flow switch was harmed in the making of this repair.

§03 — Concept Overview

Concept Overview

Bit logic (Lesson 7.4) decides whether; these instructions decide when, how many, and how much. They share one anatomy: a data structure holding a Preset (PRE) — the target — and an Accumulator (ACC) — the live running value — plus status bits the rest of the program watches.

Timers

Counters

Comparison Instructions — Where Analog Becomes Decision

EQU (=), NEQ (≠), LES (<), GRT (>), GEQ/LEQ, and LIM (true when a value is inside/outside a band) sit in rungs like contacts: GRT(Tank_Temp, 180) → alarm. Two field rules:

Math and Scaling — the Bridge from Counts to Units

ADD/SUB/MUL/DIV (and platform scaling instructions like SCL/SCP or CPT compute blocks) transform raw values into engineering units. The one every technician must recognize is the analog scaling pattern: raw A/D counts (Lesson 6.1) → scaled units via the linear map (raw − raw_min) × (EU_span ÷ raw_span) + EU_min. When an HMI value is exactly proportional-but-wrong, the error lives here (the double-square-root scenario of Lesson 6.6 is this lesson's math gone wrong). Division by a tag that can reach zero produces program faults with timestamps — a fault table entry pointing at a math instruction usually means a sensor or entry feeding it went to zero.

§04 — How the Principle Works

How the Principle Works: Reading PRE vs. ACC Live — the Diagnostic Goldmine

Monitor mode shows every timer and counter's PRE, ACC, and status bits in real time. The comparisons between them answer most timing/counting service calls:

The boundary that cannot be crossed: presets and setpoints visible in monitor mode are also editable in monitor mode on most platforms. Reading them is diagnosis; changing them is a controlled program change — engineering review, site change process, documentation (and on anything safety-related, SME/engineering only). The Field Scenario technician measured, documented, and escalated; the preset change happened through the change process. That is the lane (formalized further in Lesson 7.6).

§05 — Reference Matrix

Instruction Reference Matrix

Instruction What It Does Key Status/Data Classic Field Misbehavior It Explains
TON Delay after rung true EN, TT, DN; ACC resets on false "Machine pauses N seconds then faults" = a TON's DN gating a check that's failing
TOF Hold after rung false DN stays on during delay "Fan keeps running after stop" = working as designed; read PRE
RTO Accumulates across interruptions Holds ACC; needs RES "Timer remembers through power cycle" = correct; find the RES rung
CTU/CTD Count transitions up/down ACC vs. PRE; DN at PRE; retentive Double/missed counts = sensing problem or scan-time physics, not the counter
RES Clears timer/counter ACC — "Counts vanish at shift change" = an intentional RES rung firing
EQU/NEQ/LES/GRT/LIM Value comparisons as rung conditions Compares tags/constants live "Alarm threshold wrong" = read the live setpoint tag, often HMI-entered
ADD/SUB/MUL/DIV/SCL Arithmetic and scaling Source/dest tags Proportionally-wrong HMI values = scaling math; faults on DIV = divisor hit zero
§06 — Field Application Checklist

Field Application Checklist: Diagnosing a Timing or Counting Complaint

Boundaries — restated because this lesson lives next to them: monitor/read-only; no preset, setpoint, or logic changes; no forces; changes go through engineering and the site change process. LOTO and electrical rules per Module 1 for any physical verification.

  1. Quantify the complaint in time or count: "faults every morning" becomes "flow proves at 3.4 s vs. a 3.0 s allowance" only if you measure. Stopwatch the physical event; capture HMI/fault timestamps.
  2. Locate the relevant timer/counter via the fault message, HMI tag, or cross-reference from the output involved (Lesson 7.4 tracing).
  3. Read the structure live: PRE, ACC, time base, and status bits through several machine cycles. Record actual ACC values at the moments that matter (when flow proves, when the part passes, when the fault latches).
  4. Classify using Section 4's signatures: waiting vs. bouncing vs. miscounting vs. mis-scaled. Each signature points at a different physical chase (input chatter → Lesson 6.2/7.3 chain; scan-time miss → hardware counting; process slower than allowance → engineering data package).
  5. Verify the physical side before blaming values: a "wrong" count or time is usually a true report of a wrong physical condition — the Field Scenario's timer was honestly reporting a slower pipe.
  6. Check the human inputs: HMI-adjustable presets and setpoints — current value vs. the documented/spec value. Unexplained differences go in the report (and the site change process gets a gap flagged: adjustable values without change control drift forever).
  7. Package the diagnosis as data: instruction, address/tag, PRE/time base, measured ACC behavior, physical measurements, and the recommended change — delivered to engineering. The technician's deliverable is the case, not the keystroke.
  8. After any authorized change is made (by the authorized party), verify across the conditions that showed the problem — the morning cold start, not just a warm afternoon test — and document closure with the same numbers that opened it.
§07 — Knowledge Check

Knowledge Check

A packaging machine must place 24 bottles per case. Several times per shift, a case indexes out with 23 bottles, and the case counter's fault history shows no errors. In monitor mode, the technician watches the bottle counter (CTU, PRE = 24) across many cases: most cases count cleanly 1-per-bottle to 24, but on the short cases, the ACC is seen to jump from 18 to 20 on a single bottle — and the case still indexes at "24." The bottle-detect photoeye's channel LED, watched simultaneously, flickers twice as one slightly tipped bottle passes on those cases. What is the correct diagnosis and action?
§08 — Source List

Source List

← Lesson 7.4 Academy Home Lesson 7.6 →