FB_FTP_FileExist

It can be checked whether a certain file exists on the FTP server with the function block FB_FTP_FileExist. This function block uses an already open connection to an FTP server.
Inputs
VAR_INPUT
sNetID : T_AmsNetId := '';
hFTP : T_HFTP;
sFile : T_MaxString:= '';
bExecute : BOOL;
tTimeout : TIME := T#15s;
END_VAR
Name | Type | Description |
---|---|---|
sNetID | T_AmsNetId | A string containing the AMS network ID of the target device, at which the ADS command is directed. |
hFTP | T_HFTP | Handle of the FTP server. |
sFile | T_MaxString | Filename to be searched. |
bExecute | BOOL | The function block is executed with the rising edge. |
tTimeout | TIME | Indicates the timeout period. |
Outputs
VAR_OUTPUT
bBusy : BOOL;
bError: BOOL;
nErrID: UDINT;
bExist: BOOL;
END_VAR
Name | Type | Description |
---|---|---|
bBusy | BOOL | The command is in the process of being transmitted by ADS. No new command will be accepted as long as "bBusy" remains TRUE. |
bError | BOOL | Becomes TRUE, as soon as an error occurs. |
nErrID | UDINT | Returns the corresponding error code in the event of a set bError output. |
bExist | BOOL | Becomes TRUE if the specified file was found. |
Requirements
Development Environment |
Target Platform |
PLC Libraries to include |
---|---|---|
TwinCAT v3.0 Build 3102 |
PC or CX (x86) |
Tc2_FTP |