LGF_BinaryMaskCompare (FC / V1.0.0)

Overview

Author: Siemens Simatic Systems Support

Short description

This function compares two binary Values source and compare by a given mask.
Both given values are masked (input AND mask), and the results is than compared and returned.
Can be used for Word and Byte as well, by convert the passed parameter using for e.g. Byte_to_DWord(...).

Block Interface

LGF_BinaryMaskCompare (FC)
DWord  source Ret_Val  Bool
    
DWord  compare   
    
DWord  mask   
    
   

Input parameter

IdentifierData type Description
sourceDWord Source value to compare
compareDWord Value to compare against
maskDWord Mask the data - bits will pass if TRUE or block if FALSE

Output parameter

IdentifierData type Description
Ret_ValBool Return TRUE if masked values are equal

Change log

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