Download

Download 1:

Starts a download operation.

Syntax

METHOD Download : BOOL
VAR_INPUT
    fbFtpConnection       : REFERENCE TO FB_FtpConnection;
    sServerSourcePath     : STRING;
    sLocalTargetDirectory : STRING;
END_VAR

Download 2: Return value

Name

Type

Description

Download

BOOL

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

nTransferHandle

UDINT

Handle for the transfer operation.

Download 3: Inputs

Name

Type

Description

fbFtpConnection

FB_FtpConnection

References the server connection to be used for the operation.

sServerSourcePath

STRING

Path to the source on the server. Can be a file path or a directory path. Supports wildcards.
Example: "\*.txt" downloads all TXT files in the root directory of the server.

sLocalTargetDirectory

STRING

Path to the local target directory.