
Appendix C: Status model
Model 2461 Interactive SourceMeter® Instrument Reference Manual
C-20
2461-901-01 A/November 2015
Using TSP commands:
reset()
-- Clear the reading buffer
defbuffer1.clear()
-- Clear the status byte
status.clear()
-- Map bit 0 of operational status register to set on trigger
-- model exit (2732) and clear on trigger model enter (2731).
status.operation.setmap(0, 2732, 2731)
-- 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
-- Configure a simple measurement loop using the trigger model
smu.source.level = 1
smu.source.ilimit.level = 10e-3
-- Configure a simple trigger model to take 10 measurements
trigger.model.setblock(1, trigger.BLOCK_BUFFER_CLEAR)
trigger.model.setblock(2, trigger.BLOCK_SOURCE_OUTPUT, smu.ON)
trigger.model.setblock(3, trigger.BLOCK_DELAY_CONSTANT, 100e-3)
trigger.model.setblock(4, trigger.BLOCK_MEASURE, defbuffer1)
trigger.model.setblock(5, trigger.BLOCK_BRANCH_COUNTER, 9, 3)
trigger.model.setblock(6, trigger.BLOCK_SOURCE_OUTPUT, smu.OFF)
-- Start the trigger model
trigger.model.initiate()
-- Instrument will generate an SRQ when done
waitcomplete()
printbuffer(1, defbuffer1.n, defbuffer1)
SRQ on trigger model notify event
This example shows you how to use the trigger model's Log Event block to generate a service
request (SRQ). This example configures the trigger model to perform a sweep and to repeat that
sweep multiple times. The Log Event block is used to generate events to indicate when a sweep
starts and when it ends. An SRQ is generated each time the sweep ends. This example is most
useful when you are gathering several sweeps of data on a device and you want to notify the
controlling computer when each sweep has completed so it can retrieve the data from the sweep
without interrupting the test.