14: TSP command reference  2470 High Voltage SourceMeter Instrument 
 
14-244 2470-901-01 Rev. A / May 2019 
trigger.model.setblock() — trigger.BLOCK_MEASURE 
This function defines a trigger block that makes a measurement. 
Type  TSP-Link accessible  Affected by  Where saved  Default value 
Instrument reset 
Usage 
trigger.model.setblock(blockNumber, trigger.BLOCK_MEASURE) 
trigger.model.setblock(blockNumber, trigger.BLOCK_MEASURE, bufferName) 
trigger.model.setblock(blockNumber, trigger.BLOCK_MEASURE, bufferName, count) 
The sequence of the block in the trigger model 
The name of the buffer, which must be an existing buffer; if no buffer is defined, 
defbuffer1
 is used
The number of measure readings to make before moving to the next block in the 
trigger model; set to a specific value or infinite (trigger.COUNT_INFINITE) or
stop infinite (trigger.COUNT_STOP)
Details 
When trigger model execution reaches this block: 
1. The instrument begins making a measurement.
2. The trigger model execution waits for the measurement to be made.
3. The instrument processes the reading and places it into the specified reading buffer.
When you set the count to a finite value, trigger model execution remains at the block until all 
operations are complete. If you set the count to infinite, the trigger model executes subsequent blocks 
and measurements continue in the background until the trigger model execution reaches another 
measure block, a wait block, or until the trigger model ends. 
You must select a measure function before running a trigger model that contains this block. 
If you are using a user-defined reading buffer, you must create it before you define this block. 
Example 
 
smu.measure.func = smu.FUNC_DC_VOLTAGE 
trigger.model.setblock(1, trigger.BLOCK_BUFFER_CLEAR, defbuffer1) 
trigger.model.setblock(2, trigger.BLOCK_DELAY_CONSTANT, 0) 
trigger.model.setblock(3, trigger.BLOCK_MEASURE, defbuffer1, 
trigger.COUNT_INFINITE) 
trigger.model.setblock(4, trigger.BLOCK_WAIT, trigger.EVENT_DISPLAY) 
trigger.model.setblock(5, trigger.BLOCK_MEASURE, defbuffer1, trigger.COUNT_STOP) 
trigger.model.setblock(6, trigger.BLOCK_NOTIFY, trigger.EVENT_NOTIFY1) 
trigger.model.initiate() 
waitcomplete()