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);
Free · no signup to try
Run this block in your browser
Try the instruction on a live rung before you copy it into a project — nothing to install.
Try it in your browser — no signupOpens plcsimulationsoftware.com — same team
Prefer ready-made code? Ladder Logic Pack — $29 on Gumroad
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 →Free · no signup to try
Wire this block up and run it
Drop the instruction into a rung, press Run and watch it execute in your browser — then adapt it to your vendor tool.
Try it in your browser — no signupOpens plcsimulationsoftware.com — same team
Prefer ready-made code? Ladder Logic Pack — $29 on Gumroad