Move two values to a destination area
This FP instruction copies two values from the inputs to a destination area defined by d_Start.
Input
Source area
Output
Destination area
The input and output variables have to be of the same data type.
If the values specified using the index modifier are out of range.
If the transfer range is outside the accessible range.
If the values specified using the index modifier are out of range.
If the transfer range is outside the accessible range.
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..1] OF REAL:=[2(0.0)];
bEnable: BOOL:=FALSE;
rValue2: REAL:=3.4;
rValue1: REAL:=1.2;
END_VAR
When the variable bEnable is set to TRUE, the function is executed.
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_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_F,FP_MOVE2!,,20,0,27,5,,?DEN?D@'s1'?Ds2?AENO?Cd_Start);
L(1,2,5,2);
L(7,2,20,2);
L(27,3,28,3);
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
END_BODY
If (bStart) then
FP_MOVE2(s1 := rValue1, s2 := rValue1, d_Start => rArray[0];
End_if;