Set MEWNET-W parameters
This FP instruction sets the MEWNET-W parameters for the MEWNET-W unit in the slot specified by s1_Slot.
Input
Slot number of expansion unit
Parameters to be set in the MEWNET-W unit
Output
Starting address of the memory area in the master unit that stores the processing result (1 word)
Content of the processing result d_Result
FALSE: Process is completed
TRUE: Process is in progress
FALSE: Normal completion
TRUE: Abnormal completion
Before you execute the instruction, make sure that the bit 15 (process in-progress flag) of the processing result storage area specified by dResult is FALSE.
The processing result is stored in the area specified by d_Result.If an error occurs, the execution result flag (bit 14) is turned to TRUE. The error code is stored in lower bytes of d_Result.
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
bEnable: BOOL:=FALSE;
iSlot: INT:=0;
dutMewnetWParameters: FP_MEWNET_W_PARAMETERS_DUT;
wResult: WORD:=0;
END_VAR
When the variable bEnable is set to TRUE, the function is executed.
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 7 ;
NETWORK_BODY
B(B_CONTACT,,bEnable,4,3,6,5,);
B(B_F,FP_MEWNET_W_SET_PARAMETERS!,,15,2,32,7,,?DEN?Ds1_Slot?Ds2_dutMewnetWParameter?AENO?Cd_Result);
B(B_VARIN,,iSlot,13,4,15,6,);
B(B_VAROUT,,wResult,33,4,35,6,);
B(B_VARIN,,dutMewnetWParameters,13,5,15,7,);
L(1,0,1,7);
L(1,4,4,4);
L(6,4,15,4);
L(32,5,33,5);
END_NETWORK_BODY
END_NET_WORK
END_BODY
If (bEnable) Then
FP_MEWNET_W_SET_PARAMETERS(s1_Slot := iSlot,
s2_dutMewnetWParameter := dutMewnetWParameters,
d_Result => wResult);
End_if;