FP_ETHERNETIP_GET_STATUS

Read the status of a node

This FP instruction reads the status of the node specified by s_NodeNumber and stores the values in the output variable of the type FP_ETHERNETIP_NODE_STATUS_DUT.

Parameters

Input

s_NodeNumber (WORD, INT, UINT)

Node number

Output

d1_dutNodeStatus (FP_ETHERNETIP_NODE_STATUS_DUT)

Destination to which the data is written

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;
		iNodeNumber: INT:=0;
		dutNodeStatus: FP_ETHERNETIP_NODE_STATUS_DUT;
	END_VAR

POU body

When the variables sys_bIsEtherNetIPReady and bEnable are 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 := 8 ;
        NETWORK_BODY
B(B_CONTACT,,bEnable,12,1,14,3,);
B(B_VARIN,,iNodeNumber,12,4,14,6,);
B(B_VAROUT,,dutNodeStatus,30,4,32,6,);
B(B_CONTACT,,sys_bIsEtherNetIPReady,5,1,7,3,);
B(B_F,FP_ETHERNETIP_GET_STATUS!,,14,2,30,6,,?DEN?Ds_NodeNumber?AENO?Cd1_dutNodeStatus);
L(1,2,5,2);
L(7,2,12,2);
L(14,2,14,4);
L(1,0,1,8);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

IF (sys_bIsEtherNetIPReady) AND (bEnable) then
    FP_ETHERNETIP_GET_STATUS(s_NodeNumber := iNodeNumber, d1_dutNodeStatus => dutNodeStatus);
END_IF;

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