FB_FtpConnection

This function block can be used to manage a connection to an FTP/SFTP server. Different methods allow you to create a profile, connect to the server, and disconnect from the server.
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. |
Outputs
VAR_OUTPUT
bError : BOOL;
ipResultMessage : I_TcMessage;
bBusy : BOOL;
eActiveOperation : E_FtpClientOperation;
uConnectionState : U_FtpConnectionState;
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 | Indicates the current operation. | |
uConnectionState | U_FtpConnectionState | Indicates the current connection state. Will be updated automatically. |
Properties
Name | Type | Access | Description |
---|---|---|---|
nIdentifier | UDINT | Get | Indicates the ID of the connection that was assigned during initialization. |
Methods
Name | Description |
---|---|
Allows you to add a new connection profile. | |
Starts the connection establishment to a server. | |
Disconnects from a server. |
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT v3.1 Build 4026 | PC or CX (x86) | Tc3_FTP |