Skip to content

LES — Less Than

Category
Compare
Type
Input (condition)
Availability
All platforms

LES instruction block: Source A Level reading 35, Source B 20, dark because 35 is not below 20


LES (Less Than) is true when Source A is strictly less than Source B. It is a condition that writes nothing. Use LES for a low alarm, a low-level fill demand, an “under target” test, or the bottom edge of a band together with GRT. When “equal to” should also count, use LEQ. LES does not accept STRING operands; there is no ordering for text.


Operand Type Format Valid Range Required Description
Source A Any numeric tag, member, element or bit, or a literal Tag, Tag.Member, Tag[n], Tag.bit, or a literal Any resolvable numeric reference Yes The value under test.
Source B Same as Source A Same Any resolvable numeric reference; defaults to 0 Yes The threshold.

Literals may be whole numbers (25, -3, 0x1F) or decimals (72.5). Mixed INT and REAL operands compare as numbers. A BOOL reads as 0 or 1.


No state. Evaluates from the current values on the first scan.

The instruction does not pass continuity. The block still colours by its own result on the canvas.

Both operands are read. If A is less than B the instruction conducts; if A is greater than or equal to B the rung is false from this point.

Nothing.


Scenario: A tank level in percent. Below 20 % a fill valve opens.

Tags:

  • Level — Tank level, INT (percent)
  • Fill — Fill valve, BOOL

Rung 1:

—[LES Level 20]———(OTE Fill)———

Scan 1 — Level = 35. 35 is not less than 20: the block is dark, Fill = 0.

Figure 1 — LES false: Level reads 35 against Source B 20, the block dark, Fill off

Scan 2 — Level = 12. 12 is less than 20: the block lights, Fill = 1.

Figure 2 — LES true: Level reads 12, the block lit, Fill on

At exactly 20 the valve is closed; LES is strict. If it should open at 20 as well, use LEQ.


  • LEQ — Less Than or Equal
  • GRT — Greater Than (the mirror test)
  • LIM — Limit Test (both edges of a band in one instruction)
  • CMP — Compare by expression
  • Compare Instructions — Category index

No hysteresis. A level hovering at the threshold will chatter the valve. Open on LES Level 20 and close on GRT Level 30 with an OTL/OTU pair, or a seal-in, when that matters.

Signed values. Every numeric type is signed, so LES Offset 0 is true for negative offsets.

Members as operands. LES Batch.ACC Batch.PRE is true while a counter has not reached its preset, which is XIO Batch.DN written the long way.

Applies to LadderIDE >=1.2.2 · Last reviewed 2026-09-11 · Screenshots verified 2026-09-11