netGetLANParam (Functionblock) |
Top Previous Next |
netGetLANParam will read out the TCP/IP parameters previously set from the RTCU IDE or by the netSetLANParam function.
The format of an IP address is the same as returned by the sockGetLocalIP function.
Input: iface : SINT (default 2) The network interface to read configuration for. 2 = LAN 1 network, 3 = LAN 2 network, etc. (See Network) Please note that the iface parameter is only supported on NX32L.
Output: DHCP : BOOL Use DHCP to obtain TCP/IP parameters automatically.
IP : DINT The IP address of the device.
SubnetMask : DINT The Subnet mask of the device.
Gateway : DINT The TCP/IP gateway the device uses.
AutoDNS : BOOL Obtain the DNS parameters automatically.
DNS1 : DINT The first Domain Name Server the device uses to look up symbolic names.
DNS2 : DINT The second Domain Name Server the device uses to look up symbolic names.
Declaration: FUNCTION_BLOCK netGetLANParam;
Example: INCLUDE rtcu.inc |