Reading the IP and MAC addresses

This sample shows you how to read the IP and MAC addresses. The function block FB_MDP_NIC_Read can be used to retrieve information from the network adapter.

Sample

Var
    FB_MDP_NIC_Read    : FB_MDP_NIC_Read;
END_VAR

PROGRAM:
FB_MDP_NIC_Read(
    bExecute:=TRUE ,
    tTimeout:= ,
    iModIdx:= ,
    sAmsNetId:= ,
    bBusy=> ,
    bError=> ,
    nErrID=> ,
    iErrPos=> ,
    stMDP_ModuleHeader=> ,
    stMDP_ModuleContent=> );

The output stMDP_ModuleHeader displays the header information. The output stMDP_ModuleContent displays, among other things, the information about the IP and MAC addresses.

Reading the IP and MAC addresses 1:
Content of the MDP module with IP and MAC address.