Get status of all Ethernet units using FTP 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_FTP_SET_MODE or the setting dialog of the FTP client.
Before you execute the instruction, you need to specify the transfer settings for data recording files using FP_FTP_SET_MODE_TRANSFER_LOG or the setting dialog of the FTP 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_FTP_SET_MODE or in the setting dialog of the FTP client is specified.
if a transfer setting for data recording files that has not been configured with the instruction FP_FTP_SET_MODE_TRANSFER_LOG or the setting dialog of the FTP client is specified.
if the instruction is executed in an interrupt program
if a transfer setting that has not been configured with FP_FTP_SET_MODE or in the setting dialog of the FTP client is specified.
if a transfer setting for data recording files that has not been configured with the instruction FP_FTP_SET_MODE_TRANSFER_LOG or the setting dialog of the FTP 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,24,3,26,5,);
B(B_CONTACT,,bGetStatusAll,5,2,7,4,);
B(B_F,FP_FTP_GET_STATUS_ALL!,,11,1,24,5,,?DEN?AENO?CdutFPClientStatusAll);
L(1,3,5,3);
L(7,3,11,3);
L(1,0,1,5);
END_NETWORK_BODY
END_NET_WORK
END_BODY
(* First get status of all FTP Transfer numbers: e.g. ID0..ID15 *)
If (bGetStatusAll) then
FP_FTP_GET_STATUS_ALL(dutClientStatusAll => dutFPClientStatusAll);
End_if;