FB_GetNetworkConfig

FB_GetNetworkConfig 1:
Function block FB_GetNetworkConfig

This function block can determine information on the current network configuration.

INPUT

VAR_INPUT
   bStart         : BOOL;
END_VAR

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

OUTPUT

VAR_OUTPUT
   bBusy          : BOOL;      
   bError         : BOOL;           
   iErrorId       : WORD;           
   sMacId         : STRING(17);
   sIPAddr        : STRING(15);
   sSubnetMask    : STRING(15);
   sDefaultGateway    : STRING(15);
   sDnsServer     : STRING(15);
   sTargetName    : STRING(20);
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).

sMacId: Returns the MAC ID of the bus controllers, e.g. '00-01-05-13-45-63'.

sIPAddr: Returns the IP address of the Bus Controller.

sSubnetMask: Returns the SubNet mask.

sDefaultGateway: Returns the default gateway.

sDnsServer: Returns the default DNS server (assigned by the DHCP server).

sTargetName: Returns the Bus Controller's current target name.

Development environment

Target platform

PLC libraries to be linked

TwinCAT v2.10.0 and above

BX9000 (165) firmware version >=1.12

TcBaseBX9000.lbx