TwinCAT FTP Client: Getting connection information with the FB_FTP_Info
This sample illustrates the using of the function block FB_FTP_Info.
Variable declaration
PROGRAM MAIN
VAR
FB_FTP_Info1 : FB_FTP_Info;
list : ARRAY [0..5] OF ST_FTP_ConnInfo;
startstop : BOOL;
busy : BOOL;
err : BOOL;
errid : BOOL;
entries : UDINT;
END_VAR
PLC Program
FB_FTP_Info1(
sNetID:= ,
pList:= ADR(list),
cbList:= SIZEOF(list),
bExecute:= startstop,
tTimeout:= T#15s,
bBusy=> busy,
bError=> err,
nErrID=> errid,
nEntries=> entries);
The "TcFTPClient.lib", "TcSystem.lib", "TcBase.lib" and "STANDARD.lib" libraries are to be linked.
At the following picture you can see a possible output:
