Setpoint Math & Reset Schedules Logic
Open a running wiresheet and find a setpoint — the number a comparator or a PID block is holding the process to. Trace the wire feeding that SP pin and, more often than not, it doesn't come from a typed-in constant. It comes out of a little chain of math blocks. This page is about that chain. One question, start to finish: how does a sheet compute a setpoint — and how does an outdoor-air reset schedule come out of four math blocks? The block vocabulary (pins, wires, the scan) is Function-Block Basics; here we put the Math and Selection families to work.
Setpoints Are Computed, Not Typed
The reason sheets compute setpoints instead of typing them is maintenance
arithmetic: one number should drive many decisions. A zone sheet doesn't
store "cool at 74 °F,
stop at 70 °F"
as two unrelated constants — it stores one setpoint and computes the
edges. Take a setpoint constant of
72 °F and a
deadband constant of
2 °F: an
ADD builds the upper edge and a SUB builds the lower
(72 + 2 = 74 and 72 − 2 = 70).
The Function-Block Editor's two thermostat examples are wired exactly this
way — one SP constant, one deadband constant, the edges computed. Change the
setpoint and both edges follow; nobody has to remember there were two numbers
to edit. (What those edges do at the threshold — hysteresis, chatter,
why the deadband exists at all — is the comparator story, its own lesson in
this chapter.)
The same two blocks carry the occupied/unoccupied story. An unoccupied heating
setpoint isn't a second opinion — it's the occupied number with a setback
subtracted: occupied
70 °F minus a
5 °F setback is
70 − 5 = 65 °F
after hours. Wire it as SUB and the building manager's "make it a
degree warmer" request is a one-constant edit that updates every mode at once.
MIN and MAX compute a setpoint a different way: by
choosing among values that already exist. A MAX is a
high-select — feed it the heating demands of several zones
(say 35%, 62%, and 18%) and it passes 62%, the neediest zone, so the plant
serves the worst case and every other zone is satisfied for free. A
MIN is a low-select — the classic use is a
ceiling: wire a computed setpoint into one input and a hard limit constant
into the other, and the computed number can never beat the ceiling on its way
to the equipment. Keep that pair straight by asking what wins: MAX
lets the biggest request win; MIN lets the limit win.
The Linear Reset — a Straight Line Plus a Clamp
Now the classic payoff, and the reason this lesson exists: the outdoor-air reset schedule. The idea from the system side: on a design-cold day a heating loop needs its hottest water, and on a mild day that same water temperature is overkill — so the BMS slides the hot-water setpoint down as the outdoor air warms up. Why that saves energy, and how the endpoint numbers get picked, is the system pages' territory — it's the same move as pump control's DP setpoint reset and duct static's trim & respond, which are the system side of this math. This page owns the other half of the story: what the reset schedule is on the sheet. And on the sheet, a reset schedule is nothing more than y = mx + b plus a clamp.
Start where the design engineer starts: two endpoints. This schedule says the
loop wants
180 °F water
when it's 0 °F
outside, and
140 °F water
when it's 60 °F
outside. Between the endpoints, a straight line. To turn two points into a
line, compute the slope — rise over run, exactly as taught:
m = (140 − 180) ÷ (60 − 0) = −40 ÷ 60 ≈ −0.667.
The sign is the sanity check: the setpoint must fall as the outdoor
air rises, so a reset slope is negative. Then anchor the line with
the intercept, from either endpoint:
b = 180 − (−0.667 × 0) = 180.
This schedule's cold end happens to sit at 0 °F, so the intercept is the design endpoint itself — which is why reset schedules are so often quoted from a zero-degree design day: the b comes for free.
The whole schedule is one formula:
SP = −0.667 × OAT + 180.
Check it in the middle: on a
30 °F day,
SP = −0.667 × 30 + 180 = −20.0 + 180 = 160.0 °F
— halfway through the outdoor span, halfway down the water span. The line
below is that schedule drawn out, worked point and all.
Now build it from blocks — and this is the part that earns the "four math
blocks" in this page's question. An analog input reads the outdoor-air
sensor. A MUL multiplies it by a slope constant. An
ADD adds the intercept constant. A LIMIT clamps the
result to the design band. The clamped value lands on the analog output —
the loop's setpoint. That's the whole schedule:
AI → MUL → ADD → LIMIT → AO, m and b riding along as constants.
The Function-Block Editor ships this exact sheet as its
hot-water reset example, with the slope constant stored as −0.667
(the rounded −40/60) and the intercept as 180. On the editor's default
30 °F
day the wires read: 30 into the MUL, −20.0 out of it, 160 out of
the ADD, and 160 through the LIMIT to the output.
(One honesty note: with the rounded −0.667 the raw sum is really 159.99, and
the editor's value strip rounds it back to 160 — carry the exact −40/60
fraction and the middle point is exactly 160. Rounded slope constants living
slightly off their exact fraction is normal on real sheets too.)
Why the LIMIT? Because a straight line doesn't know where the
design range ends — it just keeps going. Let the outdoor air drop to
−10 °F and
the unclamped line asks for
−0.667 × (−10) + 180 = 6.7 + 180 = 186.7 °F
water — hotter than anything the designer sized the loop for, and the deeper
the cold snap, the further past design the request climbs. The boiler was
picked, the piping rated, and the loop's own high-limit set around water the
system was meant to see; the setpoint chain shouldn't be the thing
that commands water past all of that just because the weather left the design
range. The LIMIT is the safety rail that keeps the math inside
the engineering: everything between
140 and 180 °F
passes through untouched, and outside that band the clamp holds the nearer
endpoint. The same clamp catches the other end too — on a
70 °F
afternoon the line would ask for less-than-design-minimum water, and the
floor holds
140 °F so
the loop stays hot enough to do its job.
One more thing before you file "reset schedule" away as new material: you have already done this math on this site. Two points, a slope, an intercept, a straight line between — that's exactly the arithmetic of signal scaling, where the two points are a transmitter's range endpoints instead of two design days. The signal-scaling tool's 2-Point → Slope/Offset tab will literally solve a reset schedule: feed it (x₁ = 0, y₁ = 180) and (x₂ = 60, y₂ = 140) and m and b drop out — the same two numbers the sheet's constants carry. One piece of math, two jobs, both of them everywhere in this trade.
A units note for metric readers: the editor's canned sheet carries the IP constants (−0.667, 180, the 140–180 clamp) and computes in °F — the °C figures on this page are the same schedule restated (slope −0.665, intercept 70.4, clamp 60.0–82.2), not what the sim's wires display.
Switching Setpoints — the SELECT Block
The third way a sheet computes a setpoint is to pick one of two, on a
true/false signal. That's the SELECT block: two analog inputs,
one boolean selector, one output. Wire the occupied cooling setpoint
(72 °F) into
one input, the unoccupied setback value
(65 °F) into
the other, and the occupancy schedule bit into the selector — when the
building is occupied the block passes
72 through, and the moment the
schedule drops, the output snaps to
65. Downstream, the comparator or
PID holding the zone never knows the switch happened; it just sees its
setpoint wire change value on one scan. And because a SELECT's
inputs are ordinary analog wires, they don't have to be constants — a
computed value (that reset schedule, say) can ride into one input and a fixed
setback into the other.
Need more than two modes? Chain the selects: the first picks between unoccupied and morning-warm-up values, the second picks between that result and the occupied setpoint, and two boolean wires walk the output through three modes. How a building decides which mode it's in — schedules, overrides, warm-up logic, the state machine behind those boolean wires — is a design story of its own, and it gets its own lesson rather than a paragraph here.
Load It and Watch the Clamp Catch
All of this is sitting in the
Function-Block Editor,
already wired: open it and click the hot-water reset example. Select
the OAT input and walk its value in the inspector. At 30, the output reads
160 — the worked point above, live. Now drag the value down past 0 and watch
the ADD wire keep climbing while the output pins at 180: that's
the LIMIT catching the cold end. Run it up past 60 and the
output pins at 140 — the floor. The whole lesson is in that one move: the
line does the math, and the clamp keeps the math inside the design.