FP_ETHERNETIP_START

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.

Parameters

Input

d_dutStateTable (FP_ETHERNETIP_STATE_TABLE_DUT)
  • Node number table for start requests

  • Memory area address storing the maximum node number (1-256) or a constant.

Output

d_Result (WORD)

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

Error flags

sys_bIsOperationErrorHold (turns to TRUE and remains TRUE)
  • if the read area is outside the permissible range

  • if the instruction is executed in an interrupt program

sys_bIsOperationErrorNonHold (turns to TRUE for one scan)
  • if the read area is outside the permissible range

  • if the instruction is executed in an interrupt program

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
		bEnable: BOOL:=FALSE;
		wResult: WORD:=0;
		dutNodes_NodeTableStart: FP_ETHERNETIP_STATE_TABLE_DUT;
	END_VAR

POU body

When the variables sys_bIsEtherNetIPStartStopControllable and bEnable are set to TRUE, the function is carried out.

LD body

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

ST body

IF (sys_bIsEtherNetIPStartStopControllable) AND (bEnable) then
    FP_ETHERNETIP_START(d_dutStateTable := dutNodes_NodeTableStart,
                        d_Result => wResult);
End_if;
END_IF;

Modified on: 2022-03-02Feedback on this pagePanasonic hotline