
Section 4: Applications
Series 3700A System Switch/Multimeter User's Manual
Program code
In the following table, all commands are sent from the computer to the Series 3700A. This example
can be run using TSB Embedded. The Series 3700A sends all commands in the shaded rows to the
System SourceMeter instrument through the TSP-Link interface. Commands in unshaded rows are
executed by the Series 3700A.
Example program code for the Series 3700A
Code
Notes and comments
loadscript diodeTest
Create a script "diodeTest" to contain
test configuration and execution
instructions.
function configSwitch()
Create a function to configure the Series
3700A.
tsplink.reset()
localnode.reset()
errorqueue.clear()
Reset TSP-Link.
Reset Series 3700A.
Clear errors.
muxChannels = {}
Define table that details crosspoints to
close to connect each diode to the SMU.
muxChannels[1] = "1001, 1202"
muxChannels[2] = "1003, 1204"
muxChannels[3] = "1005, 1206"
muxChannels[4] = "1007, 1208"
muxChannels[5] = "1009, 1210"
muxChannels[6] = "1011, 1212"
for i = 1, 6 do
scan.addimagestep(muxChannels[i])
end
Add entries to the table.
Use the values in the table to create a
scan list.
tsplink.trigger[1].mode = tsplink.TRIG_FALLING
tsplink.trigger[2].mode = tsplink.TRIG_FALLING
tsplink.trigger[1].clear()
tsplink.trigger[2].clear()
Set TSP-Link lines 1 and 2 to send and
receive falling-edge triggers.
Clear any latched triggers on TSP-Link
trigger lines 1 and 2.
scan.bypass = scan.ON
scan.trigger.arm.stimulus = 0
scan.trigger.channel.stimulus =
tsplink.trigger[2].EVENT_ID
tsplink.trigger[1].stimulus =
scan.trigger.EVENT_CHANNEL_READY
scan.scancount = 1
Configure the scanning and triggering
mode of Series 3700A. Bypass needed
for trigger signal to start scan.
Arm scan immediately.
Trigger channel close action with receipt
of trigger on TSP-Link line 2.
Output trigger on TSP-link line 1 after
channel close action occurs.
Loop through scan list once.
end
End of the
configSwitch
function.
4-16
3700AS-900-01 Rev. A / July 2011