Learn PLCs free
Ladder Logic ElementsBeginnerImportant
6 min read
Updated
Beginner

PLC Preset Value: Timer PT, Counter PV and PRE

PRE - Preset Value

Quick answer

A PLC preset value is the configured threshold a timer or counter compares with its current value. IEC timers commonly use PT, IEC counters use PV, and Rockwell timer/counter structures use PRE. A preset is not the elapsed time or current count.

Key Takeaways

  • A PLC preset value is the configured threshold a timer or counter compares with its current value. IEC timers commonly u...
  • Beginner-level topic in Ladder Logic Elements
  • Commonly used in: Timer delays and pulse durations, Counter batch sizes and maintenance limits

Detailed Definition

The preset value defines when an instruction changes state. For an IEC TON, Q becomes TRUE after elapsed time ET reaches preset time PT while IN remains TRUE. For an IEC CTU, Q becomes TRUE when current value CV reaches or exceeds preset value PV. Rockwell Logix exposes a .PRE member and instruction-specific accumulator or status fields.

A numeric preset is incomplete without units and range. Rockwell Logix timer PRE values use milliseconds in the documented TIMER model, while IEC TIME literals such as T#5s carry a time type. Changing a preset online or from code can immediately change the comparison result, so dynamic presets need validation, bounds and a defined active-cycle policy.

Evidence and scope

Timer and counter preset terminology was checked against current Rockwell Logix Designer, Siemens STEP 7 and CODESYS documentation. Units, writable behavior and what happens when a preset changes while active remain instruction- and platform-specific.

Technical review:

PLC timer boundary test comparing just below, equal to and just above a configured preset
Editorial illustration: the most useful preset test points are immediately below, exactly at and immediately above the threshold
PLC timer state machine showing idle, timing, done and reset states around a preset threshold
Editorial illustration: a preset participates in a state machine; it is not a delay instruction by itself

Critical behavior

  • A preset is the target threshold; ET, CV or ACC is the current value.
  • Time presets require explicit units. The number 5000 can mean five seconds only in a documented millisecond-based instruction.
  • Timer completion usually tests elapsed time against the preset; counter completion commonly tests current count greater than or equal to the preset.
  • Editing a preset while an instruction is active can make the done condition true or false on the next execution.
  • Operator-entered presets need type, minimum, maximum and authorization checks before logic uses them.

Verification checklist

  1. 1Record the preset data type, engineering units and allowed range.
  2. 2Test immediately below, exactly at and immediately above the threshold.
  3. 3Change the preset while inactive, while active and after completion.
  4. 4Verify restart and recipe-loading ownership of the value.
  5. 5Trend preset, current value, done output and reset on the same time axis.

IEC and vendor terminology

Similar-looking instructions do not always have identical execution, initialization or storage behavior.

PlatformCommon termWhat to verify
IEC-style timerPTPreset Time, normally a TIME value. Q and ET behavior depends on TON, TOF, TP or the selected timer block.
IEC-style counterPVPreset Value compared with Current Value CV. CTU commonly sets Q when CV is greater than or equal to PV.
Rockwell Logix.PREPreset member in TIMER or COUNTER structures. Current Logix timer documentation uses one-millisecond units.
Siemens STEP 7PT / PV; PRESET_TIMERPT/PV are normal block parameters. PRESET_TIMER is a separate operation that writes a time into an IEC timer instance and can affect a running timer.

Timer and counter preset boundaries

PT and PV are thresholds with different data types and meanings; neither is the current elapsed or count value.

Preset boundary test table

Test the comparison around the exact threshold and after an online preset change.

State / phaseCurrent valuePresetExpected done state
Below threshold4.999 s or 11 counts5 s or 12FALSE
At threshold5.000 s or 12 counts5 s or 12TRUE
Above threshold5.001 s or 13 counts5 s or 12TRUE
Preset lowered while active4 s or 10 countsChanged to 3 s or 8Usually TRUE on evaluation; verify platform
Resolution and update timing determine when the exact transition is observable. Record the task period and instruction version with the result.

Working LD and ST example

Bound and apply an operator-entered timer preset

Prevent zero, negative or excessive recipe values from reaching the timer block.

Ladder Diagram

|----[ Recipe_Valid ]----[ TON MixDelay, PT=SafeMixTime ]-----|
|----[ MixDelay.Q ]------------------------( ) Mixing_Done-----|

Structured Text

SafeMixTime := LIMIT(T#1s, OperatorMixTime, T#10m);

MixDelay(
    IN := RecipeValid AND Mixing,
    PT := SafeMixTime
);

MixingDone := MixDelay.Q;

Expected result: The timer receives a TIME value between one second and ten minutes. An invalid recipe cannot silently create a zero-time or excessive delay.

Failure modes and diagnostic checks

SymptomLikely causeCheck next
A five-second preset produces a much longer or shorter delayThe value was entered in the wrong time base or converted from an untyped numeric value.Inspect the instruction data type and online PT/PRE value, including displayed units.
Done becomes true immediately after an HMI editThe new preset is below the current ET, ACC or CV.Define whether changes apply immediately, on reset or at the next sequence start.
A counter never reaches its presetPulses are missed, the counter resets, or PV exceeds the selected numeric range.Trend CU edges, CV, reset and PV together; test the maximum configured value.
Preset returns to an old value after restartThe recipe/HMI value and controller initialization have different ownership or retentivity.Document the source of truth and test download, restart and recipe-load sequences.

Current primary and technical sources

These sources support the behavior summarized on this page. The project's controller, firmware and IDE help remain authoritative for implementation.

Continue with the practical guide

Common Questions

What is Preset Value?

A PLC preset value is the configured threshold a timer or counter compares with its current value. IEC timers commonly use PT, IEC counters use PV, and Rockwell timer/counter structures use PRE. A preset is not the elapsed time or current count.

When should I use Preset Value?

Preset Value is particularly useful in scenarios such as Timer delays and pulse durations and Counter batch sizes and maintenance limits. Consider implementing it when you need reliable, efficient solutions for these types of applications.

What should I verify before using Preset Value?

Record the preset data type, engineering units and allowed range. Test immediately below, exactly at and immediately above the threshold. Change the preset while inactive, while active and after completion. Verify restart and recipe-loading ownership of the value. Trend preset, current value, done output and reset on the same time axis.

What are related concepts I should learn?

To fully understand Preset Value, you should also familiarize yourself with TON (Timer On-Delay), TOF (Timer Off-Delay), and CTU (Count Up). These concepts work together in industrial automation systems.

Was this helpful?

Let us know if this glossary term helped you understand Preset Value better.

Your feedback helps us improve our glossary and create better content for the PLC programming community.

Quick Info

Difficulty
Beginner
Tier
Important

About Ladder Logic Elements

Contacts, coils, timers, counters, and ladder diagram components

Total Terms:70
Difficulty:Beginner to Intermediate

Free PLC simulator

Stop reading, start doing

Write ladder logic in your browser, hit Run, and watch machine scenarios react. A 12-lesson curriculum across 8 PLC dialects — free account, no credit card.

Practice PLCs free →