Topic: DMD0135

CLAMP - Limit Range

 


The Limit Range (CLAMP) instruction is used to constrain a memory location so that its value is always within a specified range. This is accomplished by copying the Input value to the Output value using the follow rules:
 

  • if the Input value is greater than or equal the High limit the Output value will be set to the High value
     

  • if the Input value is between the High and Low limits the Output value will be set to the Input value
     

  • if the Input value is less than or equal to the Low limit the Output value will be set to the Low value

 

Parameters:

Note: Use the F9 key (Element Browser) or Down-Arrow key (Auto-Complete) at any time to see a complete list of the memory locations that are valid in the current field of the instruction.

 

Input - designates the location that contains the value to clamp. This value can be any readable numeric location

 

High - designates the maximum allowable value for the Input variable. The High value can be any constant value, or any readable numeric location

 

Low - designates the minimum allowable value for the Input variable. The Low value can be any constant value, or any readable numeric location

 

Output - designates the location to store the clamped output value. This value can be any writable numeric location. Note: this can be the same element as the Input parameter.

 


Status Display:

When the ladder status is ON, in addition to the standard status values being displayed, the Limit Range instruction also displays a small trend that shows the instruction's values graphically.

 

To disable the display of the trend go to the View-> Options menu, select the Ladder tab, then uncheck the Show Trend Status selection.


See Also:

 


Rung Example: