2470 High Voltage SourceMeter Instrument Reference Manual
Appendix B: Status model
2470-901-01 Rev. A /
May
2019
B-23
Using TSP commands:
reset()
-- Clear the status byte
status.clear()
-- Map bit 0 of operational status register to set on buffer
-- full (4918) and clear on buffer empty (4917).
status.operation.setmap(0, 4918, 4917)
-- Enable bit 0 to flow through to the status byte.
status.operation.enable = 1
-- Enable the Operational Summary Bit to set the Master
-- Summary Bit/RQS
status.request_enable = status.OSB
-- Clear the buffer and make it smaller
defbuffer1.clear()
defbuffer1.capacity = 100
smu.source.range = 1
smu.source.level = 1
smu.source.ilimit.level = 10e-3
-- Set the measure count to fill the buffer
smu.measure.count = 100
smu.measure.range = 10e-3
smu.source.output = smu.ON
smu.measure.read(defbuffer1)
smu.source.output = smu.OFF
printbuffer(1, defbuffer1.n, defbuffer1)
SRQ when a measurement completes
This example shows you how to generate a service request (SRQ) when a measurement completes.
This is most useful when you have a measurement that will take a long time to complete and you wish
to free up the controlling computer to do other things while it is waiting. This can happen if you have
configured the measurement with a long delay value, a large aperture, or have enabled filtering.
This code configures the source-measure unit (SMU) for a long reading, and then configures the
trigger model to generate notify events before and after the measurement. The status model is then
configured to generate an SRQ based on the "Measurement Done" notify event. The output is turned
on and the trigger model is used to take the measurement. When the measurement completes, the
instrument generates an SRQ and returns the data.