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
| Name | Type | Description |
|---|---|---|
| MN | ANY_NUM | Minimum boundary |
| IN | ANY_NUM | Value to limit |
| MX | ANY_NUM | Maximum boundary |
Outputs
| Name | Type | Description |
|---|---|---|
| OUT | ANY_NUM | Clamped 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
Siemens (TIA Portal)
Use LIMIT instruction in TIA Portal.
Allen-Bradley (Studio 5000)
Implement with GRT/LES comparisons and conditional MOV instructions.
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.
Related Function Blocks
MAX (Maximum Selection)
Returns the larger of two or more input values.
View Reference →MIN (Minimum Selection)
Returns the smaller of two or more input values.
View Reference →SEL (Binary Selector)
Selects between two values based on a boolean condition: FALSE=IN0, TRUE=IN1.
View Reference →MUX (Multiplexer)
Selects one of N input values based on an integer selector index.
View Reference →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.
Instant download - 30-day money-back guarantee - Use on unlimited projects