2470 High Voltage SourceMeter Instrument Reference Manual
Section 14: TSP command reference
2470-901-01 Rev. A /
May
2019
14-243
trigger.model.setblock() — trigger.BLOCK_LOG_EVENT
This function allows you to log an event in the event log when the trigger model is running.
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_LOG_EVENT,
eventNumber
, "
message
")
blockNumber
The sequence of the block in the trigger model
eventNumber
The event number:
trigger.LOG_INFO
N
trigger.LOG_WARN
N
trigger.LOG_ERROR
N
Where
N
is 1 to 4; you can define up to four of each type
You can also set
trigger.LOG_WARN_ABORT
, which aborts the trigger model
immediately and posts a warning event log message
message
A string up to 31 characters
Details
This block allows you to log an event in the event log when trigger model execution reaches this block.
You can also force the trigger model to abort with this block. When the trigger model executes the
block, the defined event is logged. If the abort option is selected, the trigger model is also aborted
immediately.
You can define the type of event (information, warning, abort model, or error). All events generated by
this block are logged in the event log. Warning and error events are also displayed in a popup on the
front-panel display.
Note that using this block too often in a trigger model could overflow the event log. It may also take
away from the time needed to process more critical trigger model blocks.
Example
trigger.model.setblock(9, trigger.BLOCK_LOG_EVENT, trigger.LOG_INFO2, "Trigger model
complete.")
Set trigger model block 9 to log an event when the trigger model completes. In the event log, the message is:
TM #1 block #9 logged: Trigger model complete.
Also see
None