Bit.set(); Bit.setfield() - Keithley 2601B Reference Manual

2600b series system sourcemeter instrument
Hide thumbs Also See for 2601B:
Table of Contents

Advertisement

Section 7: TSP command reference
Also see
Bit manipulation and logic operations
bit.get()
(on page 7-10)

bit.set()

(on page 7-12)

bit.setfield()

(on page 7-12)
bit.set()
This function sets a bit at the specified index position.
Type
TSP-Link accessible
Function
No
Usage
result = bit.set(value, index)
result
value
index
Details
This function returns result, which is value with the indexed bit set. The index must be between 1 and 32.
The least significant bit of value is at index position 1; the most significant bit is at index position 32.
Any fractional part of value is truncated to make it an integer.
Example
testResult = bit.set(8, 3)
print(testResult)
Also see
Bit manipulation and logic operations
bit.clear()
(on page 7-10)
bit.get()
(on page 7-10)
bit.getfield()
(on page 7-11)
bit.setfield()
(on page 7-12)
bit.test()
(on page 7-13)
bit.toggle()
(on page 7-14)
bit.setfield()
This function overwrites a bit field at a specified index position.
Type
TSP-Link accessible
Function
No
7-12
Series 2600B System SourceMeter® Instrument Reference Manual
(on page 5-3)
Affected by
Result of the bit manipulation
Specified number
One-based bit position within value to set (1 to 32)
The binary equivalent of decimal 8 is 1000. If the bit at
index position 3 is set to 1, the returned value is
decimal 12 (binary 1100).
Output:
1.20000e+01
(on page 5-3)
Affected by
Where saved
Default value
Where saved
Default value
2600BS-901-01 Rev. B / May 2013

Advertisement

Table of Contents
loading

This manual is also suitable for:

2604b2614b2634b2635b2636b2602b ... Show all

Table of Contents