8: TSP command reference  Model DMM7510 7½ Digit Graphical Sampling Multimeter 
 
8-324  DMM7510-901-01 Rev. B / May 2015 
 
trigger.model.setblock() — 
trigger.BLOCK_RESET_BRANCH_COUNT 
This function creates a block in the trigger model that resets a branch counter to 0. 
Type  TSP-Link accessible  Affected by  Where saved  Default value 
Function  Yes 
Instrument reset 
Configuration script  Not applicable 
Usage 
trigger.model.setblock(blockNumber, trigger.BLOCK_RESET_BRANCH_COUNT, counter) 
 
The sequence of the block in the trigger model 
The block number of the counter that is to be reset 
Details 
When the trigger model reaches the Counter Reset block, it resets the count of the specified Branch 
on Counter block to zero. 
Example 
 
trigger.model.load("Empty") 
trigger.model.setblock(1, trigger.BLOCK_BUFFER_CLEAR) 
trigger.model.setblock(2, trigger.BLOCK_MEASURE) 
trigger.model.setblock(3, trigger.BLOCK_BRANCH_COUNTER, 5, 2) 
trigger.model.setblock(4, trigger.BLOCK_DELAY_CONSTANT, 1) 
trigger.model.setblock(5, trigger.BLOCK_BRANCH_COUNTER, 3, 2) 
trigger.model.setblock(6, trigger.BLOCK_RESET_BRANCH_COUNT, 3) 
trigger.model.initiate() 
waitcomplete() 
Reset trigger model settings. 
Clear defbuffer1 at the beginning of the trigger model. 
Loop and take 5 readings. 
Delay a second. 
Loop three more times back to block 2. 
Reset block 3 to 0. 
Start the trigger model and wait for measurements to complete. 
Print the number of readings in the buffer. 
Output: 
Also see 
trigger.model.getbranchcount() (on page 8-285) 
trigger.model.setblock() — trigger.BLOCK_BRANCH_COUNTER (on page 8-304)