Try a PLC free — no signup
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);

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 signup

Opens plcsimulationsoftware.com — same team

Prefer ready-made code? Ladder Logic Pack — $29 on Gumroad

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.

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 signup

Opens plcsimulationsoftware.com — same team

Prefer ready-made code? Ladder Logic Pack — $29 on Gumroad