
Model 2450 Interactive SourceMeter® Instrument Reference Manual
Appendix C: Status model
2450-901-01 Rev. B/September 2013
C-17
Status model programming examples
The following examples illustrate how to generate an SRQ using the status model.
SRQ when the SMU reaches its source limit
This example demonstrates how to generate an SRQ when the SMU detects it has reached its
source limit. After configuring the status model, in this example the source will be configured to output
current and measure voltage. If the output terminals of the SMU are left open when running this
example then the SMU will reach its source limit and generate an SRQ.
Using SCPI commands:
*RST
STAT:CLE
STAT:OPER:MAP 0, 5080, 5081
STAT:OPER:ENAB 1
*SRE 128
SOUR:FUNC CURR
SOUR:CURR:RANG 1e-3
SOUR:CURR 1e-3
SOUR:CURR:VLIM 1
SENS:FUNC "VOLT"
OUTP ON
READ?
OUTP OFF
Using TSP commands:
reset()
-- Clear the status byte
status.clear()
-- Map the event numbers
-- Map bit 0 of operational status register to set on reaching the
-- source limit (5080) and clear on dropping below the source
-- limit (5081)
status.operation.setmap(0, 5080, 5081)
-- 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
-- This code will make SMU reach V limit if output terminals are open
smu.source.func = smu.FUNC_DC_CURRENT
smu.source.range = 1e-3
smu.source.level = 1e-3
smu.source.vlimit.level = 1
smu.measure.func = smu.FUNC_DC_VOLTAGE
smu.source.output = 1
print(smu.measure.read())
smu.source.output = 0