F10_BKMV_NUMBER_OFFSET

Block move by number to a offset from source

This instruction is a modification of the F10_BKMV generated by the compiler.

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 the offset d_Offset from s1_Start if the trigger EN is in the ON-state.

Parameters

Input

s1_Start (WORD, INT, UINT)

starting 16-bit area, source

s2_Number (WORD, INT, UINT)

Number of words to be copied, source

d_Offset (WORD, INT, UINT)

starting 16-bit area, destination

Remarks

  • Whenever d_Offset = 0: 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_Offset have to be of the same data type.

Example

POU header

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)];
		CopyArrayInArray: BOOL:=FALSE;
	END_VAR

POU body

When the variable CopyArrayInArray 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 the offset d_Offset from s1_Start.

LD body

BODY
    WORKSPACE
        NETWORK_LIST_TYPE := NWTYPELD ;
        ACTIVE_NETWORK := 0 ;
    END_WORKSPACE
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 7 ;
        NETWORK_BODY
B(B_F,F10_BKMV_NUMBER_OFFSET!,Instance,9,1,23,7,,?DEN?Ds1_Start?Ds2_Number?Dd_Offset?AENO);
B(B_VARIN,,CopyArrayInArray,7,2,9,4,);
B(B_VARIN,,Array1[0],7,3,9,5,);
B(B_VARIN,,4,7,4,9,6,);
B(B_VARIN,,2,7,5,9,7,);
L(1,0,1,7);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

Modified on: 2019-01-25Feedback on this pagePanasonic hotline