FallingEdge - Manual - SIMATIC AX - System Edge Detection Library - System.EdgeDetection,library

System.EdgeDetection library

Portfolio
SIMATIC AX
Product
SIMATIC AX
Software version
7.1.47
Edition
05/2024
Language
English (original)
Package Name
@ax/system-edgedetection

Detects value changes from TRUE to FALSE of the parameter signal; if this change is detected, the output value of the parameter detected will be TRUE until the next call of this instance.

In all other cases, the parameter detected will be FALSE.

Parameters:

Name Type Section Description
signal BOOL Input Signal to be monitored.
detected BOOL Output Result of edge evaluation.

Example:

USING System.EdgeDetection;



PROGRAM SampleProgram

    VAR_EXTERNAL

        sensor : BOOL;

    END_VAR

    VAR

        fallingEdge : FallingEdge;

    END_VAR



    fallingEdge(signal := sensor);



    IF fallingEdge.detected THEN

        ; // do something

    END_IF;



END_PROGRAM