Skip to content

Delta

The Delta operation reports how much a numeric input has moved since the last time it ran. In Delta mode that is the plain difference; in Rate mode it is the difference divided by the elapsed time, giving a per-second rate of change.

Delta operation

Inputs

PortTypeRequiredDescription
>AnyNoOptional gate. When closed, the path stops and no sample is recorded.
InInteger or FloatYesThe value to track. A non-numeric or Nil value fails the Node; its On Error verb resolves the failure.

Outputs

PortTypeDefaultDescription
OutFloatNilThe change since the previous sample — a difference in Delta mode, a per-second rate in Rate mode.

Properties

NameTypeDefaultDescription
ModeComboDeltaDelta emits current − previous. Rate emits (current − previous) / seconds elapsed.
On ErrorComboStop this branchPer-op On Error verb (Stop this branch / Continue with the last value / Continue with the fallback). See the Error Handling guide.

State on Reload

Out is preserved across restarts. The remembered sample is not: after a restart the next run is a first sample again and stops the path.


  1. Gate check — if the Gate is connected and closed, the path stops and nothing is recorded.

  2. Read the input — In must carry a number. Anything else fails the Node, and its On Error verb resolves the failure.

  3. First sample? — with no previous sample held, the value and the moment are recorded and the path stops.

  4. Compute — Delta mode subtracts the held value from the current one. Rate mode divides that difference by the seconds since the held sample was taken.

  5. Replace and emit — the current value and moment become the held sample, Out is written, and the path continues.


Mode: Delta

RunInOut
1100(stops — first sample)
213030.0
3125-5.0
41250.0

  • Consumption from a cumulative meter — an energy or water meter reports a total that only rises; Delta turns it into “units used since the last reading”.
  • Detecting a runaway — feed a temperature into Rate mode and Compare the result against a ceiling to catch a fast rise long before the absolute value becomes alarming.
  • Suppressing a stuck sensor — a Delta of exactly 0 over many runs is a reading that is not moving.

Delta fails when In is unconnected, Nil, or not a number; the Node’s On Error verb resolves the failure.

VerbWhat it does
Stop this branch (default)This Node and its dependents stop; Out keeps its value and reads as a failed update.
Continue with the last valueDependents run on the value Out already holds, not stamped as new; it reads as a failed update.
Continue with the fallbackDependents run on Out’s per-output Fallback, stamped as this run’s value; it reads as a failed update. The Editor refuses a Task where the Fallback is unset.

  • Delta compares against the previous run, not against a fixed interval. How often the Node runs is decided by whatever triggers its path, so in Delta mode the size of the number depends on that cadence. Use Rate mode when the answer must be independent of it.
  • Only one value is tracked per Node. To follow several signals, use one Delta per signal.
  • The held sample does not survive a restart.