FB_GetHostByName

FB_GetHostByName 1:

This function block can determine the IP address associated with a specified host name.

INPUT

VAR_INPUT
   bStart       : BOOL;
   pHostName    : DWORD;
END_VAR

bStart: the function block is activated by a rising edge at this input.

pHostName: contains the address of a string variable with the host name. The address of a string variable can be determined with the ADR operator.

OUTPUT

VAR_OUTPUT
   bBusy        : BOOL;
   bError       : BOOL;
   iErrorId     : WORD;
   sIPAddr      : STRING(15);
END_VAR

bBusy: this output remains TRUE until the command execution is complete.

bError: this output is switched to TRUE if an error occurs during the execution of a command. The command-specific error code is contained in iErrorId.

iErrorId: contains the command-specific error code of the most recently executed command (see table).

sIPAddr: when successful, this variable contains the IP address of the host.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v2.7.0 and above

BC9xxx (165) firmware version >=0xB6

TcIPUtilitiesBC.Lb6