LIMITER_O block

Short summary

Name

LIMITER_O

→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/414780940/LIMITER_O-version-1-modificationdate-1534927832195-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 exceeds the value of L. The variable OUT is set to 0, if the value of IN falls below the value of L less 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 exceeds the value of L
0 if IN falls below the value of (L - H)

Example for usage within ST-editor

FUNCTION_BLOCK ExampleLimiterO
VAR
iLimiterO : LIMITER_O;
limit : INT := 10;
hysteresis : INT := 5;
okOut1, okOut2, okOut3, okOut4 : BOOL := TRUE;
END_VAR
/* IN is below L => OUT keeps initial value of 0 */
iLimiterO(IN := 10, L := limit, H := hysteresis);
okOut1 := iLimiterO.OUT = 0;
/* IN exceeds L => OUT changes its value to 1 */
iLimiterO(IN := 11, L := limit, H := hysteresis);
okOut2 := iLimiterO.OUT = 1;
/* IN is between (L - H) and L => OUT keeps its value 1 */
iLimiterO(IN := 6, L := limit, H := hysteresis);
okOut3 := iLimiterO.OUT = 1;
/* IN is below or equal (L - H) => OUT changes its value back to 0 */
iLimiterO(IN := 5, L := limit, H := hysteresis);
okOut4 := iLimiterO.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.