FB_GetHostByAddr

Function block FB_GetHostByAddr

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

INPUT

VAR_INPUT
   bStart    : BOOL;
   sIPAddr       : STRING(15);
   pHostName     : DWORD;
   cbMaxNameLen  : WORD;
END_VAR

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

sIPAddr: A string containing the IP address of the host.

pHostName: Contains the address of a string buffer into which the host name that has been found is written. It is the programmer who is responsible for dimensioning the buffer appropriately so that cbMaxNameLen bytes can be removed from it. The address can be determined with the ADR operator.

cbMaxNameLen: Contains the length, in bytes, of the buffer into which the host name that has been found is to be written.

OUTPUT

VAR_OUTPUT
   bBusy     : BOOL;
   bError    : BOOL;
   iErrorId      : WORD;
END_VAR

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

bError: This output is switched to TRUE as soon as 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).

Development environment

Target platform

PLC libraries to be linked

TwinCAT v2.10.0 and above

BX9000 (165) firmware version >=1.12

TcBaseBX9000.lbx