Models 707B and 708B Switching Matrix Reference Manual
Section 3: Functions and features
707B-901-01 Rev. A / August 2010
3-11
reset()
Reset the instrument
scan.add("1A05, 1B05, 1C05")
Create a three channel scan list
digio.trigger[3].mode = digio.TRIG_FALLING
Detect falling edges on digio trigger line 3
scan.trigger.channel.stimulus =
digio.trigger[3].EVENT_ID
Configure digio trigger line 3 to pace the
scan sequence
scan.scancount = 3
Set the scan count to 3
print(scan.list())
Show the configured scan list
delay(5)
Delay 5 seconds to allow viewing of scan list
scan.background()
Start the scan and let if run in the
background
ScanState, ScanCount, StepCount = scan.state()
Get the current scan state information
print(ScanState, "", ScanCount , "", StepCount)
Show the state of scanning
delay(3)
Delay 3 seconds to allow viewing of state
print("state", " scan count", "step count")
Header for output data from for loop
for x = 1, (scan.scancount * scan.stepcount) do
Loop for scan count times step count to step
the scan sequence
digio.trigger[3].assert()
Simulate the trigger occurring on digio trigger
line 3
ScanState, ScanCount, StepCount = scan.state()
Get the current scan state information
print(ScanState, "", ScanCount, "", StepCount)
Show the state of scanning
delay(3)
Delay 3 seconds to allow viewing of state
end
On the TSB Embedded page, click
Save Script
to save the script. For example, name the script
ScanExample. In the User Scripts list, select ScanExample. Click
Run
. The output of the script is:
Init) OPEN...
1) STEP: 1A05
CLOSE: 1A05
2) STEP: 1B05
OPEN: 1A05
CLOSE: 1B05
3) STEP: 1C05
OPEN: 1B05
CLOSE: 1C05
2.000000 1.000000 0.000000
Shows scan is running
(state = 2) and no steps
have completed for scan
count of 1
state scan count step count
2.000000 1.000000 1.000000
Shows scan is running
(state = 2) and just
completed step 1 for scan
count of 1
2.000000 1.000000 2.000000
Shows scan is running
(state = 2) and just
completed step 2 for scan
count of 1
2.000000 1.000000 3.000000
Shows scan is running
(state = 2) and just
completed step 3 for scan
count of 1