The Clamp operation confines a numeric input to a closed range.
A value inside [Min, Max] passes through unchanged; anything below Min leaves as Min, anything above Max leaves as Max.
Use it to keep a setpoint, a duty cycle or a sensor reading inside the range the rest of the graph is built for.
Min equal to Max makes Out that one value whatever arrives, and the Editor marks both fields with an info mark.
Inputs
Port
Type
Required
Description
>
Any
No
Optional gate. When closed, the path stops and Out keeps its previous value.
In
Integer or Float
Yes
The value to confine. A non-numeric or Nil value fails the Node; its On Error verb resolves the failure.
Outputs
Port
Type
Default
Description
Out
Float
Nil
The confined value. Always a Float, even when In was an Integer.
Properties
Name
Type
Default
Description
Min
Number
0
Lower bound, inclusive.
Max
Number
100
Upper bound, inclusive.
On Error
Combo
Stop this branch
Per-op On Error verb (Stop this branch / Continue with the last value / Continue with the fallback). See the Error Handling guide.
Protecting an actuator — confine a computed duty cycle to 0–100 before it reaches an MQTT Action, so an arithmetic surprise upstream cannot command an out-of-range setting.
Taming a sensor — hold a reading inside its physically plausible band so one spike does not distort a downstream Window average.
Bounding a setpoint — keep a user-supplied target within the range the equipment supports.
Clamp fails when In is unconnected, Nil, or not a number; the Node’s On Error verb resolves the failure.
Verb
What 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 value
Dependents run on the value Out already holds, not stamped as new; it reads as a failed update.
Continue with the fallback
Dependents 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.