Section 9
:
Instrument Control Library (ICL)
Series 3700 System Switch/Multimeter Reference Manual
9-16
Document Number: 3700S-901-01 Rev. A / August 2007
bit.toggle
Remarks
This function returns value, which is the result of toggling a bit in value1.
Any fractional part of value1 is truncated to make it an integer. The returned
decimal value is also an integer. The least significant bit of the given number is
index 1. The most significant bit is index 32.
The indexed bit for value1 is toggled from 0 to 1, or 1 to 0.
Also see
Logic and bit operations
(on page 9-9)
bit.clear
(on page 9-11)
bit.get
(on page 9-12)
bit.getfield
(on page 9-12)
bit.set
(on page 9-13)
bit.setfield
(on page 9-14)
bit.test
(on page 9-15)
Example
The binary equivalent of decimal 10 is 1010. Toggling the bit at index position 3 will
return a decimal value of 14 (binary 1110).
value = bit.toggle(10, 3)
print(value)
Output: 1.01
channel functions and attributes
Use the functions and attributes in this group to control / query switching channels. Unless
specifically noted, ch_list specifies the channels or backplane relays in a comma-delimited
format on which the function is to be performed and is in the following format:
Figure 9-1: ch_list legend
There are three different notations used to control relays: Backplane relay notation, Mux
(multiplexer) channel notation, and Matrix card notation.
To control analog backplane relays for slots with analog backplane relay channels, use S9BX
where: