Section 7: TSP command reference
Models 707B and 708B Switching Matrix Reference Manual
7-44
707B-901-01 Rev. B / January 2015
Details
This command sets the label of the channel specified in
channelList
to the value specified in the
label
parameter. The channel attributes associated with each channel remain unchanged except for
their labels.
The
label
parameter must be unique. In addition, it cannot be the same as the name of a channel
pattern, row label, or column label. If you specify a label that already exists, an error message is
generated that indicates a parameter error and channel that that is already associated the specified
label.
To clear the label, set
label
to an empty string (
""
) or to a string with a space as the first character.
After defining a label, you can use it to specify the channel instead of using the channel specifier.
An error is generated if:
•
The card in the channel slot does not support a label setting
•
The label contains a space; however, if the first character is a space, the label is cleared
•
The label is already used to represent a channel pattern
The label does not persist through a power cycle.
Example 1
channel.setlabel("1A01", "start")
channel.close("start")
print(channel.getclose("allslots"))
Sets the label for channel row 1 and column 01
on slot 1 to "start".
Output:
1A01
Example 2
channel.setlabel("1A01", "")
Clears the label for channel row 1 and
column 01, slot 1 back to "1A01".
Example 3
channel.setlabel("1A01", " ")
Also clears the label for channel row 1 and
column 01, slot 1 back to "1A01".
Also see
channel functions and attributes
(on page 5-4)
channel.setlabelcolumn()
This function assigns a label to a column.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Instrument reset
Channel reset
Create configuration script
Empty string or blank
Usage
channel.setlabelcolumn(
channel
,
label
)
channel
A string that specifies the channel that contains the column to which the label will be
applied
label
A string that lists the label for the channel column, up to eight characters