FP_SMTP_GET_STATUS

Get status of a single Ethernet unit using SMTP transmission

This FP instruction gets the information from the Ethernet unit specified by nTransferID and writes the values into the DUT FP_CLIENT_STATUS_DUT.

Parameters

Input

nTransferID (WORD, INT, UINT)

Ethernet unit ID (values: 0–15)

Output

dutClientStatus (FP_CLIENT_STATUS_DUT)

Stores the values of the Ethernet status of the specified Ethernet unit

Remarks

  • 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.

Error flags

sys_bIsOperationErrorHold (turns to TRUE and remains TRUE)
  • if the Ethernet unit ID specified is outside the permissible range (0–15)

  • 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

sys_bIsOperationErrorNonHold (turns to TRUE for one scan)
  • if the Ethernet unit ID specified is outside the permissible range (0–15)

  • 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

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
		dutFPClientStatusId5: FP_CLIENT_STATUS_DUT;
		iID8: INT:=8;
		bReadStatusID8: BOOL:=FALSE;
	END_VAR

POU body

If bReadStatusID8 is set to TRUE, the instruction 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 := 5 ;
        NETWORK_BODY
B(B_COMMENT,, ^Get status of single FTP Transfer numbers: ID8,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_CONTACT,,bReadStatusID8,5,1,7,3,);
B(B_VARIN,,iID8,10,2,12,4,);
B(B_VAROUT,,dutFPClientStatusID8,25,2,27,4,);
B(B_F,FP_SMTP_GET_STATUS!,,12,0,25,4,,?DEN?DnTransferID?AENO?CdutClientStatus);
L(1,2,5,2);
L(7,2,12,2);
L(1,0,1,6);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

IF (bReadStatusID8) then
    FP_SMTP_GET_STATUS(nTransferID := iID8, dutClientStatus => dutFPClientStatusId8);
END_IF;

Modified on: 2024-03-06Feedback on this pagePanasonic hotline