FP_ETHERNET_GET_STATUS

Read ET-LAN status

This FP instruction gets the status information of all Ethernet connections.

Parameters

Output

d_dutStatus (FP_ETHERNET_STATUS_DUT)

Stores the status information of all Ethernet connections in the FP_ETHERNET_STATUS_DUT:

  • Connection status of all connections

  • OPEN status

  • OPEN error status

  • No. of connections in-progress in the FTP server

Error flags

sys_bIsOperationErrorHold (turns to TRUE and remains TRUE)
  • if the area specified using the index modifier exceeds the limit.

  • if the destination range is out of the accessible range.

  • if the area storing parameters which is specified by d_dutStatus is invalid.

sys_bIsOperationErrorNonHold (turns to TRUE for one scan)
  • if the area specified using the index modifier exceeds the limit.

  • if the destination range is out of the accessible range.

  • if the area storing parameters which is specified by d_dutStatus is invalid.

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
		bStart: BOOL:=FALSE;
		DUT_EthernetStatus: FP_ETHERNET_STATUS_DUT;
	END_VAR

POU body

When the variable bStart changes from FALSE 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 := 6 ;
        NETWORK_BODY
B(B_CONTACT,,bStart,3,2,5,4,R);
B(B_F,FP_ETHERNET_GET_STATUS!,,6,1,20,5,,?DEN?AENO?Cd_dutStatus);
B(B_VAROUT,,DUT_EthernetStatus,20,3,22,5,);
L(1,3,3,3);
L(5,3,6,3);
L(1,0,1,6);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

IF DF(bStart) then
    FP_ETHERNET_GET_STATUS(DUT_EthernetStatus);
END_IF;
Related topics:

Modified on: 2022-01-18Feedback on this pagePanasonic hotline