VAR_INFO

Example

VAR
    aiData : ARRAY[0..9] OF INT; (* My measurements *)
    viInfo : __SYSTEM.VAR_INFO;
END_VAR
viInfo := __VARINFO(aiData);
_images/var_info.png

A monitoring snipped of the variable viInfo

TYPE VAR_INFO :
STRUCT
    /// Address of variable: for bits, address of byte which bit is accessed
    ByteAddress : DWORD;
    /// Offset in Bytes:
    ///  * If variable is global, the offset denotes a global offset in the specified area
    ///  * If variable is local, the offset denotes a local offset in the scope (fb or function)
    ByteOffset : DINT;
    /// Id of the area in runtime system. See: ``CmpApp.AppGetAreaPointer`` Parameter ``diArea``
    Area : INT;
    /// Number of Bit in Bytes. For non-Bit Types this value is -1
    BitNr : INT;
    /// Size of variable in Bits
    BitSize : UDINT;
    /// Bitaddress of variable (if variable is at %M/%I/%Q location) otherwise undefined
    BitAdress : UDINT;
    /// Type Class of variable
    TypeClass : __SYSTEM.TYPE_CLASS;
    /// Type Name (for userdeftypes : name of function block or type definition)
    TypeName : STRING(79);
    /// For Arrays : number of base elements
    NumElements : UDINT;
    /// For Arrays : type class of base type
    BaseTypeClass : __SYSTEM.TYPE_CLASS;
    /// For Arrays : bit size of base element
    ElemBitSize : UDINT;
    /// Area Information : memory, input, output, retain, global, local
    MemoryArea : __SYSTEM.MEMORY_AREA;
    /// Symbol Name : input of operator as string: up to 39 characters
    Symbol : STRING(39);
    /// Comment of Variable
    Comment : STRING(79);
END_STRUCT
END_TYPE