Section 3: Functions and features Model 2651A High Power System SourceMeter® Instrument Reference Manual
3-90 2651A-901-01 Rev. A / March 2011
Remote TSP-Link synchronization line commands
Commands that control and access the TSP-Link
®
synchronization port are summarized in the
following table. See Remote commands
(on page 5-1) for complete details on these commands. See
the table in Digital I/O bit weighting
(on page 3-87) for the decimal and hexadecimal values used to
control and access the digital I/O port and individual lines.
Use the commands in following table to perform basic steady-state digital I/O operations; for example,
you can program the Model 2651A to read and write to a specific TSP-Link synchronization line or to
the entire port.
NOTE
The TSP-Link synchronization lines can be used for both input and output. You must write a 1 to all
TSP-Link synchronization lines that are used as inputs.
Remote synchronization line commands
Command Description
tsplink.readbit(bit)
Reads one digital I/O input line.
tsplink.readport()
Reads the digital I/O port.
tsplink.writebit(bit, data)
Writes data to one digital I/O line.
tsplink.writeport(data)
Writes data to the digital I/O port.
tsplink.writeprotect = mask
Sets write-protect mask of the digital I/O port.
Programming example
The programming example below illustrates how to set Bit B1 of the digital I/O port high, and then
read the entire port value:
tsplink.trigger[1].mode = tsplink.TRIG_BYPASS
-- Set Bit B1 high.
tsplink.writebit(1, 1)
-- Read I/O port.
data = tsplink.readport()