Get status of all Ethernet units using HTTP transmission
This FP instruction gets the information from all Ethernet units nTransferID0–nTransferID15 and writes the values into the DUT FP_CLIENT_STATUS_ALL_DUT.
Output
Stores the values of the Ethernet status of all Ethernet units
This instruction is not available in interrupt programs.
Before you execute the instruction, you need to specify the transfer settings using FP_HTTP_SET_MODE or the setting dialog of the HTTP client.
When an error occurs, check the system variable sys_iEthernetConnectionErrorCode for the error code number.
if a transfer setting that has not been configured with FP_HTTP_SET_MODE or in the setting dialog of the HTTP client is specified.
if the instruction is executed in an interrupt program
if a transfer setting that has not been configured with FP_HTTP_SET_MODE or in the setting dialog of the HTTP client is specified.
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
dutFPClientStatusAll: FP_CLIENT_STATUS_ALL_DUT;
bGetStatusAll: BOOL:=FALSE;
END_VAR
If bGetStatusAll is set to TRUE, the instruction is carried out. The status values of all Ethernet units are written into the DUT dutFPClientStatusAll.
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 5 ;
NETWORK_BODY
B(B_COMMENT,,Get status of all FTP Transfer numbers: e.g. ID0..ID15,3,1,26,4,);
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 5 ;
NETWORK_BODY
B(B_VAROUT,,dutFPClientStatusAll,26,3,28,5,);
B(B_CONTACT,,bGetStatusAll,5,2,7,4,);
B(B_F,FP_HTTP_GET_STATUS_ALL!,,12,1,26,5,,?DEN?AENO?CdutFPClientStatusAll);
L(1,3,5,3);
L(7,3,12,3);
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
END_BODY
If (bGetStatusAll) then
FP_HTTP_GET_STATUS_ALL(dutClientStatusAll => dutFPClientStatusAll);
End_if;