Block move by number
The data block specified by the 16-bit starting area specified by s1_Start and the number of WORDs specified by s2_Number are copied to the block starting from the 16-bit area specified by d_Start if the trigger EN is in the ON-state.
Input
starting 16-bit area, source
number of words to be copied, source
Output
starting 16-bit area, destination
This instruction is a modification of F10_BKMV generated by the compiler.
Whenever s1_Start and d_Start are in the same data area:
s1_Start = d_Start: data will be recopied to the same data area.
The value for 's2_Number' has to be greater than 0.
The variables s1_Start, s2_Number and d_Start have to be of the same data type.
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
Array1: ARRAY [0..5] OF INT:=[6(0)];
Array2: ARRAY [0..5] OF INT:=[6(0)];
CopyArray: BOOL:=FALSE;
END_VAR
When the variable CopyArray changes from FALSE to TRUE, the function is carried out. It copies the data block starting at the 16-bit area specified by s1_Start and the number of WORDs specified by s2_Number to the block starting from the 16-bit area specified by d_Start.
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 5 ;
NETWORK_BODY
B(B_F,F10_BKMV_NUMBER!,Instance,8,0,19,5,,?DEN?Ds1_Start?Ds2_Number?AENO?Cd_Start);
B(B_VARIN,,CopyArray,6,1,8,3,);
B(B_VARIN,,Array1[0],6,2,8,4,);
B(B_VARIN,,2,6,3,8,5,);
B(B_VAROUT,,Array2[0],19,2,21,4,);
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
END_BODY