Read ET-LAN status
This FP instruction gets the status information of all Ethernet connections.
Output
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
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.
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.
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
When the variable bStart changes from FALSE 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 := 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
IF DF(bStart) then
FP_ETHERNET_GET_STATUS(DUT_EthernetStatus);
END_IF;