IEC operator⮫ “Overview”: Address function not prescribed by the standard IEC 61131-3.
BITADR returns the bit offset within the segment in a DWORD. Note that the offset value depends on whether the option byte addressing in the target settings is activated or not.
VAR var1 AT %IX2.3:BOOL; bitoffset: DWORD; END_VAR
Example in ST:
bitoffset:=BITADR(var1); (* Result if byte addressing=TRUE: 19, if byte addressing=FALSE:
35 *)




NOTICE

After an Online Change there might be changes concerning the data on certain addresses. Please regard this in case of using pointers on addresses.