GetState

GetState 1:

Returns the current state of a specific transfer operation. This method can be used, for example, to check the progress of a file upload/download.

Syntax

METHOD GetState : BOOL
VAR_INPUT
    fbFtpConnection : REFERENCE TO FB_FtpConnection;
    nTransferHandle : UDINT;
END_VAR
VAR_OUTPUT
    stTransferState : ST_FtpTransferState;
END_VAR

GetState 2: Return value

Name

Type

Description

GetState

BOOL

Returns TRUE when the method has completed. Whether the action was successful can be read from the bError variable of the function block.

stTransferState

ST_FtpTransferState

Contains the state information for the transfer operation.

GetState 3: Inputs

Name

Type

Description

fbFtpConnection

FB_FtpConnection

References the server connection to be used for the operation.

nTransferHandle

UDINT

TransferHandle of the transfer operation.