Compare boxes: where a number becomes true
What you'll learn
Bring an analog word into a rung with the six compare boxes — and know when ≥ beats > and why EQU almost never belongs on a transmitter.
A rung is a chain of true/false questions — but the level is 72, not true. Something has to turn a number into an answer, and that something is the compare box: the doorway every analog value walks through to enter ladder logic.
The six questions you can ask a number
A compare box sits in a rung exactly where a contact would, and it conducts while its comparison holds:
| box | conducts while | typical job |
|---|---|---|
| GEQ | value ≥ setpoint | start a pump, raise an alarm |
| GRT | value > setpoint | same, excluding the boundary |
| LEQ | value ≤ setpoint | low-level cutoff |
| LES | value < setpoint | low alarm, dry-run protection |
| EQU | value = setpoint | exact-match steps (rare on analog) |
| NEQ | value ≠ setpoint | "anything but" checks |
──────[ AI1 ≥ 95 ]──────( HN1 horn )
That's a complete alarm rung. No contact, no relay — the box IS the condition. In the builder the box even shows the live value inside ("now 93"), so you can watch the answer flip as the number crosses the line.
≥ or >? The boundary matters once
At AI1 = 95 exactly, GEQ 95 conducts and GRT 95 doesn't. Ninety-nine
scans out of a hundred you'll never see the difference — but pick the one
that says what you mean, because the day the value parks exactly on the
setpoint, the two rungs do opposite things. Convention on most floors:
alarms and starts use ≥, so the boundary is inside the action.
EQU on analog: almost never
A real analog value wobbles — 71.8, 72.1, 71.9. It may never equal 72
on any scan, so EQU 72 can be a rung that never fires. EQU belongs to
counted and stepped values (recipe numbers, sequence steps), not to
living measurements. If you catch yourself writing EQU against a
transmitter, you probably want GEQ with a deadband — which is exactly
where the next lesson goes.
Try it
Open the tank circuit
and watch rung 2: AI1 ≥ 95 → horn. Slide to 94, 95, 96 and back. Then
tap the compare chip in the rung editor — it cycles through the six
operators, and the "now" readout tells you the answer in real time.
Check your understanding
Question 1 of 2
What does a compare box like GEQ do in a rung?