FP_FTP_GET_STATUS

Get status of a single Ethernet unit using FTP 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 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.

Error flags

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

  • 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

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

  • 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

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
		bReadStatusID10: BOOL:=FALSE;
		dutFPClientStatusId10: FP_CLIENT_STATUS_DUT;
		iID10: INT:=10;
	END_VAR

POU body

If bReadStatusID10 is set to TRUE, the instruction is carried out. It gets the FTP transfer values from Ethernet unit 10 and writes the values into the DUT

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: ID10,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 := 4 ;
        NETWORK_BODY
B(B_CONTACT,,bReadStatusID10,5,1,7,3,);
B(B_VARIN,,iID10,23,2,25,4,);
B(B_VAROUT,,dutFPClientStatusId10,38,2,40,4,);
B(B_F,FP_FTP_GET_STATUS!,,25,0,36,4,,?DEN?DnID?AENO?CdutFPClientStatus);
L(1,2,5,2);
L(7,2,25,2);
L(36,3,38,3);
L(1,0,1,4);
        END_NETWORK_BODY
    END_NET_WORK
END_BODY

ST body

(* Get status of single FTP Transfer numbers: ID8 *)
If (bReadStatusID8) then
    FP_FTP_GET_STATUS(nTransferID := iID8, dutClientStatus => dutFPClientStatusID8);
End_if;

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