Section 11: TSP command reference
Series 3700A System Switch/Multimeter Reference Manual
11-326
3700AS-901-01 Rev. D/June 2018
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
,
reading
= 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 number of scans that have completed
stepCount
The number of steps that have completed
reading
If measurements are made during the scan, this parameter contains the last scan
reading completed
Details
Returns the state of the present scan, the scan count, and the step count.
The scan count is the number of the present 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 begun, the scan count is zero.
The step count 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, scanCount, stepCount)
Runs a scan in the background.
Check the present scan state.
View returned values.
Output shows that scan is running:
2.00
Also see
(on page 11-313)
(on page 11-321)
(on page 5-23)