FB_FTP_HostResolve

FB_FTP_HostResolve 1:

Host names of FTP servers can be resolved with the function block FB_FTP_HostResolve.

FB_FTP_HostResolve 2: Inputs

VAR_INPUT
sNetID   : T_AmsNetId := '';
sHostname: 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.

sHostname

T_MaxString

Host name to resolve to the associated IPv4 address.

bExecute

BOOL

The function block is executed with the rising edge.

tTimeout

TIME

Indicates the timeout period.

FB_FTP_HostResolve 3: Outputs

VAR_OUTPUT
bBusy    : BOOL;
bError   : BOOL;
nErrID   : UDINT;
sIPv4Addr: T_IPv4Addr;
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.

sIPv4Addr

T_IPv4Addr

Returns the matching IPv4 address to the specified host name.

Requirements

Development Environment

Target Platform

PLC Libraries to include

TwinCAT v3.0 Build 3102

PC or CX (x86)

Tc2_FTP