-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the TSP examples from TSB with Toolkit configs
- Loading branch information
Showing
304 changed files
with
11,013 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"files.associations": { | ||
"*.tsp": "lua" | ||
}, | ||
"Lua.diagnostics.libraryFiles": "Disable", | ||
"Lua.workspace.ignoreDir": [], | ||
"Lua.workspace.library": [ | ||
"c:\\Users\\esarver1\\.vscode\\extensions\\tektronix.tsp-toolkit-0.16.1\\node_modules\\@tektronix\\keithley_instrument_libraries\\keithley_instrument_libraries\\2450\\Helper", | ||
"c:\\Users\\esarver1\\.vscode\\extensions\\tektronix.tsp-toolkit-0.16.1\\node_modules\\@tektronix\\keithley_instrument_libraries\\keithley_instrument_libraries\\2450\\AllTspCommands" | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
TSP_Examples/2450/Leakage_Curr/.vscode/tspConfig/config.tsp.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "./tspSchema.json", | ||
"nodes":{ | ||
}, | ||
"self": "2450" | ||
} |
Empty file.
35 changes: 35 additions & 0 deletions
35
TSP_Examples/2450/Leakage_Curr/.vscode/tspConfig/tspSchema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"properties": { | ||
"nodes": { | ||
"type": "object", | ||
"patternProperties": { | ||
"^node\\d+$": { | ||
"type": "object", | ||
"properties": { | ||
"model": { | ||
"type": "string", | ||
"enum": ["2450","2460","2461","2470","2601B","2602B","2604B","2611B","2612B","2614B","2634B","2635B","2636B","DMM7510"] | ||
}, | ||
"slots": { | ||
"type": "object", | ||
"patternProperties": { | ||
"^slot\\d+$": { | ||
"type": "string" | ||
} | ||
}, | ||
"minProperties": 1 | ||
} | ||
}, | ||
"required": ["model"] | ||
} | ||
} | ||
}, | ||
"self": { | ||
"type": "string", | ||
"enum": ["2450","2460","2461","2470","2601B","2602B","2604B","2611B","2612B","2614B","2634B","2635B","2636B","DMM7510"] | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--[[ | ||
Description: This Model 2450 example shows you how to measure the | ||
leakage current of a device such as a capacitor. The Model 2450 | ||
voltage source outputs 20V as the Model 2450 ammeter measures the | ||
resulting leakage current as a function of time. This application | ||
is set up to take current measurements at 200 ms intervals for 60 s. | ||
Once the measurements are made, the capacitor is discharged to 0V and | ||
the output is turned off. The current and time measurements are printed | ||
to the Instrument Console. You can copy and paste these readings into a | ||
spreadsheet for further analysis and graphing. The program is set up | ||
to use the rear panel terminals so that low noise triax cables can | ||
be used to connect to the device. | ||
If you are measuring small current values, the device should be | ||
electrostatically shielded. If the capacitor is greater than 20nF, | ||
the high capacitance mode may need to be enabled for best results. | ||
For sourcing voltages greater than 37V, the interlock on the rear panel | ||
of the Model 2450 must be enabled. | ||
Further information on making optimal capacitor leakage measurements | ||
can be found in the Keithley Low Level Measurements Handbook. | ||
]] | ||
|
||
--reset | ||
reset() | ||
defbuffer1.clear() | ||
|
||
--set up source function | ||
smu.source.func = smu.FUNC_DC_VOLTAGE | ||
smu.source.ilimit.level = 10e-3 | ||
smu.source.level = 20 | ||
smu.source.delay = 0.2 | ||
|
||
--set up measure function | ||
smu.measure.func = smu.FUNC_DC_CURRENT | ||
smu.measure.terminals = smu.TERMINALS_REAR | ||
smu.measure.autorange = smu.ON | ||
smu.measure.nplc = 1 | ||
smu.source.highc = smu.OFF | ||
|
||
--turn on output and initiate readings | ||
smu.source.output = smu.ON | ||
trigger.model.load("DurationLoop", 60) | ||
|
||
trigger.model.initiate() | ||
|
||
--wait for complete | ||
waitcomplete() | ||
|
||
--parse index and data into three columns | ||
print("Rdg #", "Time (s)", "Current (A)") | ||
for i=1, defbuffer1.n do | ||
print(i, defbuffer1.relativetimestamps[i], defbuffer1[i]) | ||
end | ||
|
||
--Discharge the capacitor to 0V and turn off the output | ||
smu.source.level = 0 | ||
delay(2) | ||
smu.source.output = smu.OFF |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"files.associations": { | ||
"*.tsp": "lua" | ||
}, | ||
"Lua.diagnostics.libraryFiles": "Disable", | ||
"Lua.workspace.ignoreDir": [], | ||
"Lua.workspace.library": [ | ||
"c:\\Users\\esarver1\\.vscode\\extensions\\tektronix.tsp-toolkit-0.16.1\\node_modules\\@tektronix\\keithley_instrument_libraries\\keithley_instrument_libraries\\2450\\Helper", | ||
"c:\\Users\\esarver1\\.vscode\\extensions\\tektronix.tsp-toolkit-0.16.1\\node_modules\\@tektronix\\keithley_instrument_libraries\\keithley_instrument_libraries\\2450\\AllTspCommands" | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
TSP_Examples/2450/SweepI_MeasV/.vscode/tspConfig/config.tsp.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "./tspSchema.json", | ||
"nodes":{ | ||
}, | ||
"self": "2450" | ||
} |
Empty file.
35 changes: 35 additions & 0 deletions
35
TSP_Examples/2450/SweepI_MeasV/.vscode/tspConfig/tspSchema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"properties": { | ||
"nodes": { | ||
"type": "object", | ||
"patternProperties": { | ||
"^node\\d+$": { | ||
"type": "object", | ||
"properties": { | ||
"model": { | ||
"type": "string", | ||
"enum": ["2450","2460","2461","2470","2601B","2602B","2604B","2611B","2612B","2614B","2634B","2635B","2636B","DMM7510"] | ||
}, | ||
"slots": { | ||
"type": "object", | ||
"patternProperties": { | ||
"^slot\\d+$": { | ||
"type": "string" | ||
} | ||
}, | ||
"minProperties": 1 | ||
} | ||
}, | ||
"required": ["model"] | ||
} | ||
} | ||
}, | ||
"self": { | ||
"type": "string", | ||
"enum": ["2450","2460","2461","2470","2601B","2602B","2604B","2611B","2612B","2614B","2634B","2635B","2636B","DMM7510"] | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--[[ | ||
Description: This Model 2450 example shows you how to sweep the | ||
test current and measure the resulting voltage drop on a low | ||
resistance device. The Model 2450 current source outputs a sweep | ||
from -100 mA to 100 mA in 101 steps as the Model 2450 voltmeter | ||
measures the resulting voltage drop across the resistor. This | ||
application is set up to take 101 readings with a 100 ms interval | ||
time. Once the measurements are made, the output is turned off. | ||
The current and voltage readings are printed to the Instrument | ||
Console. You can copy and paste these readings into a spreadsheet | ||
for further analysis and graphing. | ||
--]] | ||
|
||
--Reset the instrument | ||
reset() | ||
defbuffer1.clear() | ||
|
||
--Measure Settings | ||
smu.measure.func = smu.FUNC_DC_VOLTAGE | ||
smu.measure.autorange = smu.ON | ||
smu.measure.nplc = 1 | ||
smu.measure.sense=smu.SENSE_4WIRE | ||
|
||
--Source Settings | ||
smu.source.func = smu.FUNC_DC_CURRENT | ||
smu.source.vlimit.level = 1 | ||
smu.source.delay = 0.1 | ||
smu.source.sweeplinear('LowR', -100e-3, 100e-3, 101) | ||
|
||
--Run trigger model and wait for it to complete | ||
trigger.model.initiate() | ||
waitcomplete() | ||
|
||
--Print Results | ||
if defbuffer1.n == 0 then | ||
print("Buffer is empty\n") | ||
else | ||
print("Current\tVoltage") | ||
for i=1,defbuffer1.n do | ||
print(string.format("%g\t%g", defbuffer1.sourcevalues[i], defbuffer1.readings[i])) | ||
end | ||
end |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"files.associations": { | ||
"*.tsp": "lua" | ||
}, | ||
"Lua.diagnostics.libraryFiles": "Disable", | ||
"Lua.workspace.ignoreDir": [], | ||
"Lua.workspace.library": [ | ||
"c:\\Users\\esarver1\\.vscode\\extensions\\tektronix.tsp-toolkit-0.16.1\\node_modules\\@tektronix\\keithley_instrument_libraries\\keithley_instrument_libraries\\2460\\Helper", | ||
"c:\\Users\\esarver1\\.vscode\\extensions\\tektronix.tsp-toolkit-0.16.1\\node_modules\\@tektronix\\keithley_instrument_libraries\\keithley_instrument_libraries\\2460\\AllTspCommands" | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
TSP_Examples/2460/PulseItrain/.vscode/tspConfig/config.tsp.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "./tspSchema.json", | ||
"nodes":{ | ||
}, | ||
"self": "2460" | ||
} |
Empty file.
35 changes: 35 additions & 0 deletions
35
TSP_Examples/2460/PulseItrain/.vscode/tspConfig/tspSchema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"properties": { | ||
"nodes": { | ||
"type": "object", | ||
"patternProperties": { | ||
"^node\\d+$": { | ||
"type": "object", | ||
"properties": { | ||
"model": { | ||
"type": "string", | ||
"enum": ["2450","2460","2461","2470","2601B","2602B","2604B","2611B","2612B","2614B","2634B","2635B","2636B","DMM7510"] | ||
}, | ||
"slots": { | ||
"type": "object", | ||
"patternProperties": { | ||
"^slot\\d+$": { | ||
"type": "string" | ||
} | ||
}, | ||
"minProperties": 1 | ||
} | ||
}, | ||
"required": ["model"] | ||
} | ||
} | ||
}, | ||
"self": { | ||
"type": "string", | ||
"enum": ["2450","2460","2461","2470","2601B","2602B","2604B","2611B","2612B","2614B","2634B","2635B","2636B","DMM7510"] | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
--[[This particular example shows how to generate a current pulse train. | ||
In particular, this code generates 10 pulses with a magnitude of 6 A and a pulse width | ||
of 1 ms. The pulse period is 4 ms and the load that is used is 1 ohm. More information | ||
about this tsp code can be found in the View This First document. | ||
]] | ||
|
||
reset() | ||
|
||
--[[Set Up Pulse parameters | ||
*biaslevel: the offset current for the pulse train | ||
*pulselevel: the amplitude current of each pulse (from zero, not bias level) | ||
*biaswidth: the time at the bias level | ||
*pulsewidth: the time at amplitude level for each pulse | ||
*points: total number of pulses | ||
*limit: the source limit level | ||
]] | ||
|
||
--User specified test parameters: | ||
local biaslevel = 0 | ||
local pulselevel = 6 | ||
local biaswidth = 3e-3 | ||
local pulsewidth = 1e-3 | ||
local period = pulsewidth + biaswidth | ||
local points = 10 | ||
local limit = 7 | ||
|
||
--Set to current source and set up source config list | ||
smu.source.configlist.create("OutputList") | ||
smu.source.func = smu.FUNC_DC_CURRENT | ||
smu.source.readback = smu.OFF | ||
|
||
--Set up measure commands | ||
smu.measure.func = smu.FUNC_DC_VOLTAGE | ||
smu.measure.nplc = 0.01 | ||
smu.measure.autozero.once() | ||
|
||
smu.measure.terminals = smu.TERMINALS_FRONT | ||
smu.measure.range = limit | ||
smu.measure.sense = smu.SENSE_4WIRE | ||
|
||
local measuredelay = pulsewidth -((1/localnode.linefreq)*smu.measure.nplc + 450e-6) | ||
if measuredelay < 50e-6 then measuredelay = 50e-6 end | ||
|
||
-- Set the source range large enough to fit both the bias and level. | ||
smu.source.range = math.max(math.abs(biaslevel), math.abs(pulselevel)) | ||
smu.source.delay = 0 | ||
smu.source.vlimit.level = limit | ||
|
||
--Set to pulselevel (amplitude) and save to list | ||
smu.source.level = pulselevel | ||
smu.source.configlist.store("OutputList") | ||
|
||
--Set to biaslevel and save to list | ||
smu.source.level = biaslevel | ||
smu.source.configlist.store("OutputList") | ||
|
||
--Setup Timers | ||
-- Use timer[1] to control the Period of the pulse train | ||
trigger.timer[1].reset() | ||
trigger.timer[1].start.generate = trigger.ON | ||
trigger.timer[1].delay = period | ||
trigger.timer[1].count = points - 1 -- Effective count will be points because trigger.timer[1].start.generate = trigger.ON | ||
|
||
-- Use timer[2] to control the Pulse Width of the pulses | ||
trigger.timer[2].reset() | ||
trigger.timer[2].start.stimulus = trigger.EVENT_TIMER1 | ||
trigger.timer[2].start.generate = trigger.OFF | ||
trigger.timer[2].delay = pulsewidth | ||
trigger.timer[2].count = 1 | ||
trigger.timer[2].enable = trigger.ON | ||
|
||
--Trigger model setup | ||
trigger.model.setblock(1, trigger.BLOCK_BUFFER_CLEAR) | ||
trigger.model.setblock(2, trigger.BLOCK_SOURCE_OUTPUT, smu.ON) | ||
trigger.model.setblock(3, trigger.BLOCK_WAIT, trigger.EVENT_TIMER1) | ||
trigger.model.setblock(4, trigger.BLOCK_CONFIG_RECALL, "OutputList") | ||
trigger.model.setblock(5, trigger.BLOCK_DELAY_CONSTANT, measuredelay) | ||
trigger.model.setblock(6, trigger.BLOCK_MEASURE_DIGITIZE) | ||
trigger.model.setblock(7, trigger.BLOCK_WAIT, trigger.EVENT_TIMER2) | ||
trigger.model.setblock(8, trigger.BLOCK_CONFIG_NEXT, "OutputList") | ||
trigger.model.setblock(9, trigger.BLOCK_BRANCH_COUNTER, points, 3) | ||
trigger.model.setblock(10, trigger.BLOCK_SOURCE_OUTPUT, smu.OFF) | ||
|
||
--Start the trigger model | ||
defbuffer1.clear() | ||
trigger.model.initiate() | ||
delay(0.001) | ||
trigger.timer[1].enable = trigger.ON | ||
waitcomplete() |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"files.associations": { | ||
"*.tsp": "lua" | ||
}, | ||
"Lua.diagnostics.libraryFiles": "Disable", | ||
"Lua.workspace.ignoreDir": [], | ||
"Lua.workspace.library": [ | ||
"c:\\Users\\esarver1\\.vscode\\extensions\\tektronix.tsp-toolkit-0.16.1\\node_modules\\@tektronix\\keithley_instrument_libraries\\keithley_instrument_libraries\\2460\\Helper", | ||
"c:\\Users\\esarver1\\.vscode\\extensions\\tektronix.tsp-toolkit-0.16.1\\node_modules\\@tektronix\\keithley_instrument_libraries\\keithley_instrument_libraries\\2460\\AllTspCommands" | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
TSP_Examples/2460/SolarPanel/.vscode/tspConfig/config.tsp.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "./tspSchema.json", | ||
"nodes":{ | ||
}, | ||
"self": "2460" | ||
} |
Empty file.
Oops, something went wrong.