Returns the input or output address
This function returns the address of a variable at the input or output of a basic function.
Input
This pin must be connected to the input/output of a basic function for which the data type INT, WORD is allowed
Yields the 16-bit final address of the input/output variables
Output
Output variable for which the 16-bit final address is needed
The 16-bit final address is yielded at input/output AdrLast based on the variable at input/output Var. This input or output has to be directly attached to the 16-bit input or output of a basic function.
Only for LD and FBD Editors: Use “Input instruction” or “Output instruction” from the “Instructions” pane to insert the instruction required into the programming window.
All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.
VAR
start: BOOL:=FALSE;
data_field: ARRAY [0..5] OF INT:=[6(111)];
END_VAR
When the variable start is set to TRUE, the function is carried out. The function copies the value 100 into all elements of the data field, i.e. all six elements in data_field have the value 100.
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 8 ;
NETWORK_BODY
B(B_COMMENT,,Initialization of all data fields with the values,2,0,22,1,);
B(B_F,F11_COPY!,Instance,5,2,12,7,,?DEN?Ds?AENO?Cd1_Start?Cd2_End);
B(B_VARIN,,start,3,3,5,5,);
B(B_VARIN,,100,3,4,5,6,);
B(B_F,AdrLast_Of_Var_O!,Instance,14,6,24,8,,?D?C);
B(B_VAROUT,,data_field,24,6,26,8,);
B(B_F,Adr_Of_Var_O!,Instance,14,4,22,6,,?D?C);
B(B_VAROUT,,data_field,22,4,24,6,);
L(12,5,14,5);
L(12,6,12,7);
L(12,7,14,7);
L(1,0,1,8);
END_NETWORK_BODY
END_NET_WORK
END_BODY
Further example see: Example