FB_FtpTransfer

FB_FtpTransfer 1:

This function block can be used to initiate and manage upload and download operations.

FB_FtpTransfer 2: Inputs

VAR_INPUT
    tTimeout : TIME;
    sNetID   : T_AmsNetID;
END_VAR

Name

Type

Description

tTimeout

TIME

Indicates the ADS timeout to be used between PLC runtime and the FTP client user mode process (in seconds).

sNetID

T_AmsNetID

AmsNetID of the device on which the FTP client user mode process is running. Normally, the FTP client and the PLC run on the same system, so no value needs to be assigned to this variable.

FB_FtpTransfer 3: Outputs

VAR_OUTPUT
    bError           : BOOL;
    ipResultMessage  : I_TcMessage;
    bBusy            : BOOL;
    eActiveOperation : E_FtpClientOperation;
END_VAR

Name

Type

Description

bError

BOOL

TRUE if an error has occurred.

ipResultMessage

I_TcMessage

Output with extended error and diagnostic information based on the TwinCAT 3 EventLogger.

bBusy

BOOL

TRUE as soon as the function block is in use.

eActiveOperation

E_FtpClientOperation

Indicates the current transfer operation.

FB_FtpTransfer 4: Methods

Name

Description

Abort

Aborts a transfer in progress.

Download

Downloads files or folders from a server.

GetActive

Returns the number of transfer operations currently in progress.

GetActiveVerbose

Returns the number of transfer operations currently in progress and a list of transfer handles.

GetState

Returns the state of a transfer operation currently in progress.

GetStateVerbose

Returns the detailed state of a transfer operation currently in progress (verbose).

Upload

Uploads files or folders to a server.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1 Build 4026

PC or CX (x86)

Tc3_FTP