Learn PLCs free
Selection & LimitingBeginnerIEC 61131-3

LIMIT (Value Limiter)

Constrains input value to specified minimum and maximum range.

The LIMIT function in the selection category operates as a value clamp, ensuring an input stays within a defined range. It is functionally identical to the process control LIMIT block but is classified under IEC 61131-3 as a selection function. OUT = MAX(MN, MIN(IN, MX)). This function is used wherever values need to be constrained to valid operating ranges.

Parameters

Inputs

NameTypeDescription
MNANY_NUMMinimum boundary
INANY_NUMValue to limit
MXANY_NUMMaximum boundary

Outputs

NameTypeDescription
OUTANY_NUMClamped value: MN <= OUT <= MX

Structured Text Example

// Limit speed command to safe range
Safe_Speed := LIMIT(MN := 0, IN := Speed_Cmd, MX := 3000);

// Limit analog output to valid range
AO_Value := LIMIT(MN := 0, IN := Calculated_AO, MX := 27648);

20 Production-Ready Ladder Logic Templates

Stop writing the same rungs from scratch. Get copy-paste-ready templates for motor control, PID loops, safety interlocks, conveyors, and more.

Platform-Specific Implementation

S

Siemens (TIA Portal)

Use LIMIT instruction in TIA Portal.

AB

Allen-Bradley (Studio 5000)

Implement with GRT/LES comparisons and conditional MOV instructions.

C

CODESYS

Use LIMIT() function in ST. Standard IEC function.

Common Applications

  • Speed command limiting
  • Analog output range clamping
  • Setpoint validation
  • Position command limiting
  • Safe operating range enforcement

Frequently Asked Questions

What is LIMIT (Value Limiter) in PLC programming?

Constrains input value to specified minimum and maximum range. The LIMIT function in the selection category operates as a value clamp, ensuring an input stays within a defined range. It is functionally identical to the process control LIMIT block but is classified under IEC 61131-3 as a selection function.

What are common applications of LIMIT (Value Limiter)?

LIMIT (Value Limiter) is commonly used for: Speed command limiting, Analog output range clamping, Setpoint validation, Position command limiting, Safe operating range enforcement.

How do I use LIMIT (Value Limiter) in different PLC platforms?

Siemens: Use LIMIT instruction in TIA Portal. Allen-Bradley: Implement with GRT/LES comparisons and conditional MOV instructions. CODESYS: Use LIMIT() function in ST. Standard IEC function.

Stop Writing Ladder Logic From Scratch

Get 20 production-ready ladder logic templates for $29 -- download instantly and use them on your next project today.

20
Ready-Made Templates
LD + ST
Both Languages Included
$29
One-Time Purchase
Get Instant Access -- $29

Instant download - 30-day money-back guarantee - Use on unlimited projects

Free PLC simulator

Wire this block up and run it

Drop the instruction into a rung, hit Run, and watch it execute in your browser. 12 guided lessons across 8 PLC dialects — free account, no credit card.

Practice PLCs free →