Section 7: Command reference
Models 707B and 708B Switching Matrix Reference Manual
7-152
707B-901-01 Rev. A / August 2010
Example
scan.scancount = 5
Sets the scan count to 5.
Also see
scan.state()
This function provides the present state of a running background scan.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function Yes
Usage
scanState, scanCount, stepCount = scan.state()
scanState
The present state of the scan running in the background. Possible states include:
scan.EMPTY
or
0
scan.BUILDING
or
1
scan.RUNNING
or
2
scan.ABORTED
or
3
scan.FAILED
or
4
scan.FAILED_INIT
or
5
scan.SUCCESS
or
6
scanCount
The current number scans that have completed
stepCount
The current number steps that have completed
Details
scanCount
is the number of the current iteration through the scan portion of the trigger model. This number
does not increment until the scan begins. Therefore, if the instrument is waiting for an input to trigger a scan
start, the scan count represents the previous number of scan iterations. If no scan has yet to begin, the scan
count is zero (0).
stepCount
is the number of times the scan has completed a pass through the channel action portion of the
trigger model. This number does not increment until after the action completes. Therefore, if the instrument is
waiting for an input to trigger a channel action, the step count represents the previous step. If no step has yet
completed, the step count is zero. If the step count has yet to complete the first step in a subsequent pass
through a scan, the scan count represents the last step in the previous scan pass.
Example
scan.background()
scanState, scanCount, stepCount = scan.state()
print(scanState)
Runs a scan in the background
Check the present scan state
View value of scanState
Output shows that scan is running:
2.0000