Get status of all Ethernet units using SMTP 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 e-mail transmission settings using FP_SMTP_SET_MODE or the setting dialog of the SMTP client.
Before you execute the instruction, you need to specify the e-mail transfer settings for data recording files using FP_SMTP_SET_MODE_TRANSFER_LOG or the setting dialog of the SMTP client.
When an error occurs, check the system variable sys_iEthernetConnectionErrorCode for the error code number.
if an e-mail transmission setting that has not been configured with the instruction FP_SMTP_SET_MODE or the setting dialog of the SMTP client is specified.
if an e-mail transmission setting for data recording files that has not been configured with the instruction FP_SMTP_SET_MODE_TRANSFER_LOG or the setting dialog of the SMTP client is specified.
if the instruction is executed in an interrupt program
if an e-mail transmission setting that has not been configured with the instruction FP_SMTP_SET_MODE or the setting dialog of the SMTP client is specified.
if an e-mail transmission setting for data recording files that has not been configured with the instruction FP_SMTP_SET_MODE_TRANSFER_LOG or the setting dialog of the SMTP 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
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,, ^First 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 := 6 ;
NETWORK_BODY
B(B_VAROUT,,dutFPClientStatusAll,25,3,27,5,);
B(B_CONTACT,,bGetStatusAll,5,2,7,4,);
B(B_F,FP_SMTP_GET_STATUS_ALL!,,11,1,25,5,,?DEN?AENO?CdutClientStatusAll);
L(1,3,5,3);
L(7,3,11,3);
L(1,0,1,6);
END_NETWORK_BODY
END_NET_WORK
END_BODY
IF (bGetStatusAll) then
FP_SMTP_GET_STATUS_ALL(dutClientStatusAll => dutFPClientStatusAll);
END_IF;