LGF_GetBitStates (FB / V1.0.0)

Overview

Author: Siemens Simatic Systems Support

Short description

This function checks a DWord for falling as well as rising edges.
It returns the number of edges, a DWord with the edge bits, and a boolean value if edge(s) are present.

Block Interface

LGF_GetBitStates (FB)
DWord  value hasChanged  Bool
    
   hasRisingEdges  Bool
    
   risingBits  DWord
    
   noOfRisingBits  USInt
    
   hasFallingEdges  Bool
    
   fallingBits  DWord
    
   noOfFallingBits  USInt
    
   

Input parameter

IdentifierData type Default value Description
valueDWord 16#00000000 Check input value for changes and edges

Output parameter

IdentifierData type Description
hasChangedBool Input value has changed (compared to the previous cycle)
hasRisingEdgesBool Input value has rising edges
risingBitsDWord Bitstream with the rising edges
noOfRisingBitsUSInt Number of rising edges in the input value
hasFallingEdgesBool Input value has falling edges
fallingBitsDWord Bitstream with the falling edges
noOfFallingBitsUSInt Number of falling edges in the input value

Change log

Version & DateChange description
01.00.00Simatic Systems Support
2021.01.28First released version