Cyclic communication start request
This FP instruction starts the node on which the start request is made and writes the result into the output variable d_Result. The node number table is specified by FP_ETHERNETIP_STATE_TABLE_DUT.
Input
Node number table for start requests
Memory area address storing the maximum node number (1-256) or a constant.
Output
Destination to which the data is written
0: Specified node start is completed
1: Specified node start processing is in progress.
2: Specified node start failed
3: Multiple starts of FP_ETHERNETIP_START
if the read area is outside the permissible range
if the instruction is executed in an interrupt program
if the read area is outside the permissible range
if the instruction is executed in an interrupt program
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;
wResult: WORD:=0;
dutNodes_NodeTableStart: FP_ETHERNETIP_STATE_TABLE_DUT;
END_VAR
When the variables sys_bIsEtherNetIPStartStopControllable and bEnable are set to TRUE, the function is carried out.
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 8 ;
NETWORK_BODY
B(B_VARIN,,dutNodes_NodeTableStart,13,5,15,7,);
B(B_VAROUT,,wResult,27,5,29,7,);
B(B_CONTACT,,bEnable,12,3,14,5,);
B(B_CONTACT,,sys_bIsEtherNetIPStartStopControllable,8,1,10,3,);
B(B_F,FP_ETHERNETIP_START!,,15,3,27,7,,?DEN?Dd_dutStateTable?AENO?Cd_Result);
L(1,2,8,2);
L(14,4,14,5);
L(14,5,15,5);
L(10,2,10,4);
L(10,4,12,4);
L(1,0,1,8);
END_NETWORK_BODY
END_NET_WORK
END_BODY
IF (sys_bIsEtherNetIPStartStopControllable) AND (bEnable) then
FP_ETHERNETIP_START(d_dutStateTable := dutNodes_NodeTableStart,
d_Result => wResult);
End_if;
END_IF;