IMDHMIControls LibraryShop main store

How-to

Retain CLICK PLC fill times for a C-more HMI display

PLC programming Published 6 min read

Short answer

Give each chamber its own CLICK timer with the retained current-value option, enable that timer only while its solenoid step is active, and let the chamber's pressure switch end the step so the value freezes. Point one C-more numerical display at each timer's current value and clear all of them with a deliberate operator reset after the times are on paper. On the millisecond base one timer spans 32.767 s, so confirm every credible fill stays under that before choosing it.

On this page
  1. Choose the time base from the slowest fill
  2. Reject the four shortcuts
  3. Build the fill step for chamber 1
  4. Advance on pressure, then freeze
  5. Repeat the pattern through chamber 20
  6. Show the retained values on the C-more
  7. Reset only when the operator says so
  8. Questions asked

One retained timer per chamber, enabled only while that chamber's solenoid step runs and ended by that chamber's pressure switch, is what puts a fill time on a C-more screen that is still there when the operator reaches for the clipboard. The CLICK's retained current-value option freezes each timer's count when its step drops out, and a C-more numerical display reads that count straight from the PLC. Twenty chambers means twenty timers, twenty numerical displays, and one operator-initiated reset that clears them only after the times are on paper. Pick the time base from the slowest fill you will ever allow, not the average, because on the millisecond base the whole span sits only a few seconds above a normal fill on this machine.

Choose the time base from the slowest fill #

The CLICK's TMR instruction gives you 500 timers, T1 through T500, and behaves like the on-delay timer defined in IEC 61131-3: the current value climbs only while the rung is true, and the timer bit switches on when the current value reaches the set point. That set point is a 16-bit integer, so it tops out at 32767, and on the millisecond base one timer therefore spans 32767 ms, which is 32.767 s. Fills on this machine run around 20 to 30 s, so check the worst case against that span before you commit:

Range check, millisecond time base
  coverage             32767 / 1000 ms per s = 32.767 s
  slowest normal fill  30 s = 30000 ms
  margin               32767 - 30000 = 2767 ms
  margin in percent    2767 / 30000 = 0.092, about 9.2%
  chamber 10% slow     30 s + 10% = 33 s, which is 0.233 s past the end of the range

A chamber that runs 10% over its normal fill lands past the span, and an enabled timer that gets there counts to the maximum and holds, freezing the display at full scale while the chamber keeps filling. The decision: keep the millisecond base only while the slowest credible fill stays under 32.767 s; if one chamber can pass that, give that timer a coarser base in the same TMR setup and accept its coarser resolution, or code the count to continue into a second timer. Put the set point at the maximum either way, so the reading has the whole span available. Add the diagnostic now, not after the first bad batch: a compare contact on each timer's current value at the maximum, in series with that step still active, flags a chamber that outgrew its range.

Reject the four shortcuts #

Each shortcut below looks faster and each one costs you the record:

Shortcut What it costs you Do this instead
One timer reused by all twenty chambers Only the last reading survives One retained timer per chamber
Timer enabled by the cycle-run bit It measures sequence time, not that chamber's fill Enable each timer from its own step only
Automatic reset at cycle completion The record is gone before anyone transcribes it Reset only from the operator's own button
Timing inside the HMI object It measures screen updates and communications, not the fill Time in the PLC and display the PLC value

Timing has to live in the controller: the CLICK refreshes every timer's current value during each scan pass, as laid out in what the PLC scan cycle does in each pass, and the C-more only mirrors whatever address you point it at.

Build the fill step for chamber 1 #

  1. Latch a cycle-active internal relay from the HMI Start button, and use it to switch on a step-1 internal relay.
  2. On the rung, a Step 1 contact energizes the solenoid-1 output and enables timer T1.
  3. In T1's setup dialog, set Current Value Option to the retained-value choice.
  4. Put the set point at the maximum count and confirm the time base while you are in that setup.
  5. If a permissive can intentionally inhibit the solenoid, wire that permissive into the timer enable too, so the timer does not count while the valve is deliberately blocked.
Start accepted AND Step 1 active --> Solenoid 1 output
                                 --> T1 enable, retained current value,
                                     set point at maximum, base as chosen

The solenoid output is the timing gate: the count runs with the fill command and stops when the pressure switch removes it. If the contact, coil and branch shapes here are still new, the walkthrough of what each ladder logic symbol does in a rung is the shortest catch-up. Prove this one chamber before copying anything: start the cycle, confirm solenoid 1 pulls in and T1 climbs, then trip pressure switch 1 and confirm the count stops changing without returning to zero.

Advance on pressure, then freeze #

The pressure switch, not a clock, ends each step: a Step 1 contact in series with a made Pressure switch 1 contact de-energizes Step 1 and switches on Step 2. Dropping Step 1 removes the solenoid and the T1 enable in the same pass, and retention leaves the elapsed count standing as the fill-time record.

Step 1 active AND Pressure switch 1 made --> Step 1 off
                                         --> Step 2 on

Gate the step's start on the switch being clear: put a normally closed Pressure switch 1 contact in series with the logic that switches Step 1 on, so a switch already made cannot give an instant transition and a near-zero reading. If a made switch at step entry can be legitimate on this machine, flag that chamber's reading invalid instead of displaying a misleading small number. One safety note: this pressure switch is a process input for timing; if the same device also serves a safety function, that function needs its own validation apart from this display logic.

Repeat the pattern through chamber 20 #

Copy the pattern chamber by chamber: step n's contact drives solenoid n, enables timer Tn, and is ended by pressure switch n, which switches on step n+1. Keep the numbering aligned, T7 with solenoid 7 and pressure switch 7, because a swapped address is the usual reason a plausible time shows beside the wrong chamber. With T1 through T500 available, twenty fill timers leave the rest of the range free. When pressure switch 20 clears the last step, switch cycle active off and switch a completion bit on so an indicator lights on the HMI; reset nothing at that transition.

Show the retained values on the C-more #

Give every chamber its own numerical display object and point its address at that timer's current-value word: T1's count lives in TD1, so chamber 20 reads TD20. Match the format to the base. Show the raw count and label the field in milliseconds, or apply the object's divide-by-1000 scaling and label it in seconds; never label an unscaled count as seconds. The C-more is the presentation layer only, so test that claim: change screens and come back while the cycle is stopped, and every object must show the same number it showed before, which is the proof that the values live in the PLC. If an object shows a bad-quality marker instead of a number, that is a communications timeout, the fault described in why HMI values show question marks: PLC comms timeouts, and the stored time behind it is untouched.

Reset only when the operator says so #

Wire the HMI reset button to a reset-request bit and accept the request only while cycle active is off, by putting a normally closed cycle-active contact in series with it. The accepted request zeroes all twenty retained values and switches the completion bit off. Keep Start wired separately from Reset so a fresh cycle cannot erase the previous record. Then run this sequence before the machine sees product:

  1. Idle, press Reset: all twenty displays show zero.
  2. Press Start: only solenoid 1 is on and only TD1 climbs.
  3. Trip each pressure switch in order: the active timer freezes and the next chamber starts.
  4. Complete chamber 20: every solenoid is off, the completion indicator is on, and all twenty times remain displayed.
  5. Change screens and return: no displayed value has moved.
  6. Press Reset during a fill: nothing clears, because the idle contact gates the request.
  7. Record the times, press Reset while idle, and confirm the sequence is ready for another Start.

That passes the design: each chamber's number is its own fill time, held past the step, shown from the PLC, and cleared only on purpose.

Questions asked

What does the display show if a fill runs past the timer's span?

The enabled timer counts to the maximum and then holds, so the display freezes at full scale and can read like a real, long fill. On the millisecond base that frozen reading is 32.767 s, produced by a chamber roughly 9% slower than a 30 s fill. Treat a flagged reading as suspect data, not as a slow but valid result; it tells you the chamber needs a coarser base, not that the fill took that long.

Do the retained values survive a power loss or a switch to program mode?

Yes. The retained choice keeps each current value through power removal and through a switch from run mode to stop mode, and only your reset trigger zeroes it. Without that option the current value resets as soon as the timer's input rung drops out, so a plain timer would erase its own reading the instant the pressure switch ended the fill. Retention is what makes the frozen number a record instead of a momentary count.

Can an event-based drum replace the twenty step rungs?

Yes. An event-based drum advances on each chamber's pressure-switch event and drives the solenoid outputs from its steps, which keeps the repeated output instructions out of the ladder. The timing rule does not change: each step still enables only its own retained timer, and the count freezes when that step ends. If ladder is still new to you, write the plain rung pattern first and move to a drum once the sequence is proven.

How do I keep a spare copy of the readings before the reset?

Add one rung ahead of the reset that moves each timer's current value into a block of holding registers. With T1 through T20 holding the fills, copy TD1 through TD20 into twenty consecutive registers and point an archive screen at those registers, so one complete set of numbers survives the reset. The operator then has a second screen, or a second shift, to transcribe from before anyone clears the archive.

Keep reading

  • How-to

    Set up a CLICK PLC 4-20 mA pressure trip with a relay output

    Wire the two-wire loop into channel 1 of a C0-04AD-1, set that channel to 4-20 mA with 4 mA scaled to 0 PSI and 20 mA to 300 PSI in DF1, and drive relay output Y1 from Set and Rst coils that trip above 250 PSI and release below 230 PSI, with a loop-fault test below -10 PSI.

    PLC programming

  • How-to

    Repeating a forward reverse sequence on an Omron PLC ladder timer

    Run the forward and reverse outputs from the PLC's normal cyclic scan and gate both commands with one 30-second run timer; when its completion flag turns ON, it removes the run permission and both outputs drop. A backward jump is unnecessary, delays scan completion and can trip the CPU watchdog.

    PLC programming

  • How-to

    Siren ring count ladder logic with a timer and counter

    Edge-detect each of the three signals, move its ring count into a stored tag once, and run the siren from two timers — one for sound, one for the pause between rings — while a counter totals completed rings. With the worked sound and pause presets, the three patterns sit 2.5 s apart, and a new request is accepted only while the sequence is idle.

    PLC programming