Limit in Advanced Ladder

See also: Compare in Advanced Ladder

See also: Project Toolbox for Advanced Ladder

 

Topic Menu

Limit Function Overview

The limit function combines a multiple comparisons into a single function and checks a value to be inside or outside a range of values.

When Low < High, TRUE if Low ≤ IN ≤ High

 

If IN is inside the range of Low to High, including those values, the function is TRUE.

When High < Low, TRUE if Low ≥ IN ≥ High

 

If IN is not inside the range of Low to High or equal to either the Low or High values, the function is TRUE

Limit Parameters

  • IN: Variable/register or static number to be checked for in or out of the specified limit

  • Low: Variables/register or static number defining the low end of the range

  • High: Variable/register or static number defining the high end of the range.

  • Type: The data format of the values being compared. INT, DINT, REAL, UINT, UDINT, LREAL formats are supported. All parameters must be of the same type.

Power Flow

The Limit function will allow power to pass through if

  • The Low value is less than the High value and IN is between or equal to those limits

  • The Low value is greater than the High value and IN is either equal to or outside those limits

There must be functions to the right of the comparison operations as they only act as a condition for power flow.

Limit Examples

Indicate to other parts of the program that the user is on one of the configuration screens that are located on screens 21 through 40 (shown in Advanced Ladder Logic):

Trigger an alarm if a value is outside an allowable range by making Low > High. Assuming “Process_Active” is TRUE; output is TRUE if Temperature is 91 or higher, or 49 or lower; output is not active if Temperature is 50-90 degrees (shown in Variable Based Advanced Ladder Logic):

Return to the Top: Limit in Advanced Ladder