LIMITER_U block

Short summary

Name

LIMITER_U

→POU type

→function block

Category

IEC-block, ControlEnh

Conform to →IEC-standard

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/add.svg not defined in IEC-standard

Graphical interface

images/download/thumbnails/414780945/LIMITER_U-version-1-modificationdate-1534927852320-api-v2.png

Available since

version 1.47.0 (for logi.CAD 3)

Functionality

This block represents a hysteresis controller that switches abruptly between two states.

The block sets the value of the variable OUT to 1, if the value of the variable IN falls below the value of L. The variable OUT is set to 0, if the value of IN exceeds the value of L plus the hysteresis H. Otherwise OUT keeps its value.
If a negative value is set for H, the value 0 is used for the hysteresis.

Restrictions

The following restrictions apply to the usage of overloadable function block instances:

  • The declaration is limited to local variables.

  • The usage as array base type is not allowed.

  • The usage as structure element is not allowed.

  • Instance data cannot be displayed in the Values of Variables view.

In-/outputs


Identifier

→Data type

Description

Inputs:

IN

REAL, LREAL, USINT, UINT, UDINT, ULINT, SINT, INT, DINT or LINT
(corresponds to →generic data type ANY_NUM)

input

L

REAL, LREAL, USINT, UINT, UDINT, ULINT, SINT, INT, DINT or LINT
(corresponds to →generic data type ANY_NUM)

limit

H

REAL, LREAL, USINT, UINT, UDINT, ULINT, SINT, INT, DINT or LINT
(corresponds to →generic data type ANY_NUM)

hysteresis

Outputs:

OUT

USINT

1 if IN falls below the value of L
0 if IN exceeds the value of (L + H)

Example for usage within ST-editor

FUNCTION_BLOCK ExampleLimiterU
VAR
iLimiterU : LIMITER_U;
limit : INT := 10;
hysteresis : INT := 5;
okOut1, okOut2, okOut3, okOut4 : BOOL := TRUE;
END_VAR
/* IN is above L => OUT keeps initial value of 0 */
iLimiterU(IN := 10, L := limit, H := hysteresis);
okOut1 := iLimiterU.OUT = 0;
/* IN falls below L => OUT changes its value to 1 */
iLimiterU(IN := 9, L := limit, H := hysteresis);
okOut2 := iLimiterU.OUT = 1;
/* IN is between L and (L + H) => OUT keeps its value 1 */
iLimiterU(IN := 11, L := limit, H := hysteresis);
okOut3 := iLimiterU.OUT = 1;
/* IN exceeds or is equal to (L + H) => OUT changes its value back to 0 */
iLimiterU(IN := 15, L := limit, H := hysteresis);
okOut4 := iLimiterU.OUT = 0;
ENO := AND(okOut1, okOut2, okOut3, okOut4);
END_FUNCTION_BLOCK

When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.