
Section 8: TSP command reference
Model 2461 Interactive SourceMeter® Instrument Reference Manual
8-290
2461-901-01 A/November 2015
For this block to work as expected, make sure you configure the trigger type and line state of the
digital line for use with the trigger model (use the digital line mode command).
Example
for x = 3,6 do digio.line[x].mode = digio.MODE_DIGITAL_OUT end
trigger.model.setblock(4, trigger.BLOCK_DIGITAL_IO, 20, 60)
The for loop configures digital I./O lines 3 through 6 as digital outputs. Trigger block
4
is then configured with a bit
pattern of
20
(digital I/O lines 3 and 5 high). The optional bit mask is specified as
60
(lines 3 through 6), so both
lines 3 and 5 are driven high.
Also see
(on page 8-50)
trigger.model.setblock() — trigger.BLOCK_DIGITIZE
This function defines a trigger block that makes a measurement using a digitize function.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Restore configuration
Instrument reset
Power cycle
Configuration script
Not applicable
Usage
trigger.model.setblock(
blockNumber
, trigger.BLOCK_DIGITIZE)
trigger.model.setblock(
blockNumber
, trigger.BLOCK_DIGITIZE,
bufferName
)
trigger.model.setblock(
blockNumber
, trigger.BLOCK_DIGITIZE,
bufferName, count
)
blockNumber
The sequence of the block in the trigger model
bufferName
The name of the buffer, which must be an existing buffer; if no buffer is defined,
defbuffer1
is used
count
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 the block:
1. The instrument begins making a measurement.
2. The trigger model execution waits for the measurement to complete.
3. The instrument places the measurement into the specified reading buffer, which cannot be of the
writable buffer style.
If you are defining a user-defined reading buffer, you must create it before you define this block.
When you set the count to a finite value, trigger model execution remains at the block until all
measurements 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 digitize block or until the trigger model ends.
A digitize function (digitize voltage or digitize current) must be selected before you run a trigger model
that contains this block. You cannot have a measure block and a digitize block in the same trigger
model.