FP_MOVE3

Move three values to a destination area

This FP instruction copies three values to a destination area defined by d_Start.

Parameters

Input

s1, s2, s3 (INT, UINT, WORD, DINT, UDINT, DWORD, REAL, DATE, TOD, DT)

Source area

Output

d_Start (INT, UINT, WORD, DINT, UDINT, DWORD, REAL, DATE, TOD, DT)

Destination area

Remarks

The input and output variables have to be of the same data type.

Error flags

sys_bIsOperationErrorHold (turns to TRUE and remains TRUE)
  • If the values specified using the index modifier are out of range.

  • If the transfer range is outside the accessible range.

sys_bIsOperationErrorNonHold (turns to TRUE for one scan)
  • If the values specified using the index modifier are out of range.

  • If the transfer range is outside the accessible range.

Related topics:

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
		rArray: ARRAY[0..2] OF REAL:=[3(0.0)];
		bEnable: BOOL:=FALSE;
		rValue3: REAL:=5.6;
		rValue2: REAL:=3.4;
		rValue1: REAL:=1.2;
	END_VAR

POU body

When the variable bEnable is set to TRUE, the function is executed.

LD body

BODY
    WORKSPACE
        NETWORK_LIST_TYPE := NWTYPELD ;
        ACTIVE_NETWORK := 0 ;
    END_WORKSPACE
    NET_WORK
        NETWORK_TYPE := NWTYPELD ;
        NETWORK_LABEL :=  ;
        NETWORK_TITLE :=  ;
        NETWORK_HEIGHT := 6 ;
        NETWORK_BODY
B(B_VARIN,,rValue1,18,2,20,4,);
B(B_VARIN,,rValue2,18,3,20,5,);
B(B_VAROUT,,rArray[0],28,2,30,4,);
B(B_CONTACT,,bEnable,5,1,7,3,);
B(B_VARIN,,rValue3,18,4,20,6,);
B(B_F,FP_MOVE3!,,20,0,27,6,,?DEN?D@'s1'?Ds2?Ds3?AENO?Cd_Start);
L(1,2,5,2);
L(7,2,20,2);
L(27,3,28,3);
L(1,0,1,6);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

If (bEnable) then
    FP_MOVE3(s1 := rValue1,
             s2 := rValue2,
             s2 := rValue3,
             d_Start => rArray[0]);
End_if;

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