Limiter (FB)

FUNCTION_BLOCK Limiter

Short Description

Limit value monitoring of an analog value


Portrayal

../_images/Limiter_FB.png

Interfaces

Inputs

Name

Datatype

Range

Init-Value

Function

rIn REAL   0

Analog input

Outputs

Name

Datatype

Range

Init-Value

Function

rOut REAL    

Analog output

xErr BOOL    
FALSE:

No limit value violation

TRUE:

Limit value violation

Setpoints / Parameters

Name

Datatype

Range

Init-Value

Function

rMinLimit REAL   -50

Lower limit value

rMaxLimit REAL   150

Upper limit value

rReplacementOption eLimiterMode InpultValue, MinValue, MaxValue, LastValue, ReplacementValue InputValue

Selection of the value at output rOut depending on the selected option

rReplacementValue REAL   0

Value at output rOut if limit value is violated and option’ ReplacementValue’ is selected

Functional Description

Analog value output rOut

The analog value output rOut follows the analog value input rIn as long as the analog value input rIn does not exceed any of the two limit values
rMinLimit or rMaxLimit.
A limit value violation is always present if the analog value input rIn is lower than the limit value rMinLimit or
higher than the limit value rMaxLimit.
In case of a limit value violation, the analog value output rOut is defined depending on the selected option rReplacementOption (eLimiterMode).
rIn ReplacementOption rOut

Notes

X InputValue rIn Option ‘InpultValue’
X MinValue rMinLimit Option ‘MinValue’
X MaxValue rMaxLimit Option ‘MaxValue’
X LastValue

Last state of rOut before the limit value violation

Option’ LastValue’ Attention: The last value is not saved on an PLC cold start!

X ReplacementValue rReplacementValue Option ‘ReplacementValue’
Legend: X = any

Digital output xErr

The digital output xErr signals an active limit violation.

Limit value violation

xErr

Notes

FALSE FALSE

No limit value violation

TRUE TRUE

Limit value violation

Legend: X = any

Visualization




Information

Element

Authors

Date

Version

Notes

Function

Adam Bartod 09.2016 1.0

Initial version

Programming

Adam Bartod 09.2016 1.0

Initial version

Test Kevin Rohn, Jochen Reu 12.2016 1.0

Initial version

Documentation

Jochen Reu 10.2017 1.0

Initial version

Documentation

Lukas Pfänder 11.2017 0.1.3.0 Revision

Codesys

InOut:
Scope Name Type Initial Comment
Input rIn REAL 0

Analog input

rReplacementValue REAL 0

Value at output rOut if limit value is violated and option’ ReplacementValue’ is selected

rReplacementOption eLimiterMode eLimiterMode.InputValue

Selection of the value at output rOut depending on the selected option

rMaxLimit REAL 150

Upper limit value

rMinLimit REAL -50

Lower limit value

Output rOut REAL  

Analog output

xErr BOOL  

Output limit value violation