FB_GetNetworkConfig

FB_GetNetworkConfig 1:

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 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).

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.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v2.7.0 and above

BC9xxx (165) firmware version >=0xB6

TcIPUtilitiesBC.Lb6