2600S-901-01 Rev. C / January 2008 Return to Section Topics 12-111
Series 2600 System SourceMeter® Instruments Reference Manual Section 12: Instrument Control Library
tsplink.readbit
Replace N with the number of the synchronization line: 1 to 3.
Function Reads the state of a TSP-Link synchronization line.
Usage data = tsplink.readbit(N)
data A custom variable that stores the state of the
synchronization line.
N Synchronization line to be read (1 - 3).
Remarks Returns a value of 0 if the line is low and a 1 if the line is high.
Details See "TSP-Link Synchronization lines" in Section 10.
Also see tsplink.readbit, tsplink.readport, tsplink.writebit.
Example
--Assume line 3 is set high, and it is then read:
data = tsplink.readbit(3)
print(data)
Output: 1.000000e+00
tsplink.readport
Function Reads the TSP-Link synchronization lines as a digital I/O port.
Usage data = tsplink.readport()
Remarks The binary equivalent of the returned value indicates the input pattern on the I/O port. The
least significant bit of the binary number corresponds to line 1 and bit 3 corresponds to line
3. For example, a returned value of 2 has a binary equivalent of 010. Line 2 is high (1), and
the other 2 lines are low (0).
Details See "TSP-Link Synchronization lines" in Section 10.
Also see tsplink.readbit, tsplink.writebit, and tsplink.writeport
Example Assume line 2 is set high, and the digio I/O port reads:
data = tsplink.readport()
print(data)
Output: 2.000000e+00
(binary 010)
tsplink.reset
Function Initializes (resets) all nodes (instruments) in the TSP-Link system.
Usage tsplink.reset()
Remarks
This function will erase all knowledge of other nodes connected on the TSP-Link and will
regenerate the system configuration. This function must be called at least once before any
remote nodes can be accessed. If the node number for any instrument is changed, the
TSP-Link must again be initialized.
Details See Section 9 “System expansion”.
Also see tsplink.node, tsplink.state