Section 8: TSP command reference
Model 2461 Interactive SourceMeter® Instrument Reference Manual
8-44
2461-901-01 A/November 2015
Example 1
extBuffer = buffer.make(100, buffer.STYLE_WRITABLE)
buffer.write.format(extBuffer, buffer.UNIT_WATT, buffer.DIGITS_3_5)
buffer.write.reading(extBuffer, 1)
buffer.write.reading(extBuffer, 2)
buffer.write.reading(extBuffer, 3)
buffer.write.reading(extBuffer, 4)
buffer.write.reading(extBuffer, 5)
buffer.write.reading(extBuffer, 6)
printbuffer(1, 6, extBuffer.readings, extBuffer.units)
Creates a 100-point reading buffer named
extBuffer
. Style is writable.
Set the data format to show units of watts with 3½ digit resolution.
Write 6 pieces of data into the buffer.
Print the buffer, including the readings and units.
Read the buffer.
Output:
1, Watt DC, 2, Watt DC, 3, Watt DC, 4, Watt DC, 5, Watt DC, 6, Watt DC
Example 2
extBuffer = buffer.make(100, buffer.STYLE_WRITABLE_FULL)
buffer.write.format(extBuffer, buffer.UNIT_WATT, buffer.DIGITS_3_5,
buffer.UNIT_WATT, buffer.DIGITS_3_5)
buffer.write.reading(extBuffer, 1, 7)
buffer.write.reading(extBuffer, 2, 8)
buffer.write.reading(extBuffer, 3, 9)
buffer.write.reading(extBuffer, 4, 10)
buffer.write.reading(extBuffer, 5, 11)
buffer.write.reading(extBuffer, 6, 12)
printbuffer(1, 6, extBuffer.readings, extBuffer.units, extBuffer.extravalues,
extBuffer.units)
Creates a 100-point reading buffer named
extBuffer
. Style is full writable.
Set the data format to show units of watts with 3½ digit resolution for the first value and for the second value in
the buffer index.
Write 12 pieces of data into the buffer.
Print the buffer, including the readings and units.
Read the buffer.
Output:
1, Watt DC, 7, Watt DC, 2, Watt DC, 8, Watt DC, 3, Watt DC, 9, Watt DC, 4, Watt
DC, 10, Watt DC, 5, Watt DC, 11, Watt DC, 6, Watt DC, 12, Watt DC
Also see
(on page 8-14)
(on page 8-41)
(on page 3-2)
(on page 3-27)