Table of contents
Instrument programming ....................................................................................... 10-1
Fundamentals of scripting for TSP ..................................................................................... 10-1
What is a script? ...................................................................................................................... 10-2
Run-time and nonvolatile memory storage of scripts .............................................................. 10-2
What can be included in scripts? ............................................................................................. 10-3
Commands that cannot be used in scripts .............................................................................. 10-3
Manage scripts ........................................................................................................................ 10-3
Working with scripts in nonvolatile memory........................................................................... 10-11
Programming example .......................................................................................................... 10-14
Fundamentals of programming for TSP ........................................................................... 10-16
Introduction ........................................................................................................................... 10-16
What is Lua? ......................................................................................................................... 10-16
Lua basics ............................................................................................................................. 10-16
Standard libraries .................................................................................................................. 10-32
Programming example .......................................................................................................... 10-36
Test Script Builder (TSB) ................................................................................................. 10-36
Installing the TSB software.................................................................................................... 10-36
Installing the TSB add-in ....................................................................................................... 10-37
Using Test Script Builder (TSB) ............................................................................................ 10-37
Project navigator ................................................................................................................... 10-39
Script editor ........................................................................................................................... 10-39
Outline view........................................................................................................................... 10-39
Programming interaction ....................................................................................................... 10-40
Password management ................................................................................................... 10-40
Password overview ............................................................................................................... 10-41
Working with TSB Embedded .......................................................................................... 10-43
Sending instrument commands with TSB Embedded ........................................................... 10-43
Advanced scripting for TSP ............................................................................................. 10-44
Global variables and the script.user.scripts table .................................................................. 10-44
Create a script using the script.new() command ................................................................... 10-46
Rename a script .................................................................................................................... 10-48
Retrieve a user script ............................................................................................................ 10-50
Delete user scripts from the instrument ................................................................................. 10-51
Restore a script to the run-time environment ........................................................................ 10-52
Memory considerations for the run-time environment ........................................................... 10-53
TSP-Link system expansion interface .............................................................................. 10-54
Overview ............................................................................................................................... 10-54
Connections .......................................................................................................................... 10-56
Initialization ........................................................................................................................... 10-56
Resetting the TSP-Link network ............................................................................................ 10-57
Using the expanded system .................................................................................................. 10-58
TSP advanced features ......................................................................................................... 10-60
Using groups to manage nodes on TSP-Link network .......................................................... 10-62
Running simultaneous test scripts ......................................................................................... 10-63
Using the data queue for real-time communication ............................................................... 10-64
Copying test scripts across the TSP-Link network ................................................................ 10-65
Removing stale values from the reading buffer cache .......................................................... 10-65
TSP-Net ........................................................................................................................... 10-66
TSP-Net capabilities .............................................................................................................. 10-66
Using TSP-Net with any ethernet-enabled instrument .......................................................... 10-67
TSP-Net compared to TSP-Link to communicate with TSP-enabled devices ....................... 10-69
TSP-Net instrument commands: General device control ...................................................... 10-69
TSP-Net instrument commands: TSP-enabled device control .............................................. 10-69
Example: Using tspnet commands ........................................................................................ 10-70
Series 2600B System SourceMeter® Instrument Reference Manual
Need help?
Do you have a question about the KEITHLEY System SourceMeter 2636B and is the answer not in the manual?