Section 14: TSP command reference
2470 High Voltage SourceMeter Instrument Reference Manual
14-86
2470-901-01 Rev. A /
May
2019
lan.ipconfig()
This function specifies the LAN configuration for the instrument.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
No
Rear panel LAN reset
Nonvolatile memory
lan.MODE_AUTO
Usage
method
,
ipV4Address
,
subnetMask
,
gateway =
lan.ipconfig()
lan.ipconfig(
method
)
lan.ipconfig(
method
, "
ipV4Address
")
lan.ipconfig(
method
, "
ipV4Address
", "
subnetMask
")
lan.ipconfig(
method
, "
ipV4Address
", "
subnetMask
", "
gateway
")
method
The method for configuring LAN settings; it can be one of the following values:
lan.MODE_AUTO
: The instrument automatically assigns LAN settings
lan.MODE_MANUAL
: You specify the LAN settings
ipV4Address
LAN IP address; must be a string specifying the IP address in dotted decimal
notation
subnetMask
The LAN subnet mask; must be a string in dotted decimal notation
gateway
The LAN default gateway; must be a string in dotted decimal notation
Details
This command specifies how the LAN IP address and other LAN settings are assigned. If automatic
configuration is selected, the instrument automatically determines the LAN information. When method
is automatic, the instrument first attempts to configure the LAN settings using dynamic host
configuration protocol (DHCP). If DHCP fails, it tries dynamic link local addressing (DLLA). If DLLA
fails, an error occurs.
If manual is selected, you must define the IP address. You can also assign a subnet mask, and
default gateway. The IP address, subnet mask, and default gateway must be formatted in four groups
of numbers, each separated by a decimal. If you do not specify a subnet mask or default gateway, the
previous settings are used.
Example
lan.ipconfig(lan.MODE_AUTO)
print(lan.ipconfig())
lan.ipconfig(lan.MODE_MANUAL, "192.168.0.7", "255.255.240.0", "192.168.0.3")
print(lan.ipconfig())
Set the IP configuration method to automatic. Request the IP configuration. Example output:
lan.MODE_AUTO 134.63.78.136 255.255.254.0 134.63.78.1
Set the IP configuration method to manual. Request the IP configuration. Output:
lan.MODE_MANUAL 192.168.0.7
255.255.240.0 192.168.0.3
Also see
None