Reference programming 7.2.8.2 SIZEOF Perform this function to determine the number of bytes required by the given data type. Example in IL: arr1:ARRAY[0..4] OF INT; var1:INT; LD arr1 SIZEOF ST var1 (* Result is 10 *) 7.2.8.3 ADR (Address Operator) Address Function ADR returns the address of its argument in a DWORD. This address can be sent to manufacturing functions to be treated as a pointer or it can be assigned to a pointer within the project. NOTICE Address data After an Online Change there might be changes concerning the data on certain addresses. Please regard this in case of using pointers on addresses. Example in ST: dwVar := ADR(bVar); Example in IL:
LD var1 ADR ST var2 7.2.8.4 ADRINST(Instance address operator) The ADRINST operator delivers the address of a program instance or function block instance (ADRINST is about equivalent to C++ this operator ). 7.2.8.5 ^ (Content Operator) A pointer can be dereferenced by adding the content operator "^" after the pointer identifier. Example in ST: pt:POINTER TO INT; var_int1:INT; var_int2:INT; pt := ADR(var_int1); var_int2:=pt^; 7.2.8.6 CAL (Calling Operator) Calling a Function Block Use CAL in IL to call up a function block instance. The variables that will serve as the input variables are placed in parentheses right after the name of the function block instance. TX1200 209 Version: 1.3