System SourceMeter® Instrument Reference Manual Table
Introduction ............................................................................................................................. 6-11
What is Lua? ........................................................................................................................... 6-11
Lua basics ............................................................................................................................... 6-11
Standard libraries .................................................................................................................... 6-25
Programming example ............................................................................................................ 6-29
Test Script Builder (TSB) ................................................................................................... 6-29
Installing the TSB software...................................................................................................... 6-29
Installing the TSB add-in ......................................................................................................... 6-30
Using Test Script Builder (TSB) .............................................................................................. 6-30
Project navigator ..................................................................................................................... 6-31
Script editor ............................................................................................................................. 6-32
Outline view ............................................................................................................................. 6-32
Programming interaction ......................................................................................................... 6-33
Password management ..................................................................................................... 6-33
Password overview ................................................................................................................. 6-34
Working with TSB Embedded ............................................................................................ 6-36
Sending instrument commands with TSB Embedded ............................................................. 6-36
Advanced scripting for TSP ............................................................................................... 6-37
Global variables and the script.user.scripts table .................................................................... 6-37
Create a script using the script.new() command ..................................................................... 6-39
Rename a script ...................................................................................................................... 6-41
Retrieve a user script .............................................................................................................. 6-43
Delete user scripts from the instrument ................................................................................... 6-44
Restore a script to the run-time environment .......................................................................... 6-45
Memory considerations for the run-time environment ............................................................. 6-45
TSP-Link system expansion interface ................................................................................ 6-46
Overview ................................................................................................................................. 6-47
Connections ............................................................................................................................ 6-49
Initialization ............................................................................................................................. 6-49
Resetting the TSP-Link network .............................................................................................. 6-50
Using the expanded system .................................................................................................... 6-51
TSP advanced features ........................................................................................................... 6-52
Using groups to manage nodes on TSP-Link network ............................................................ 6-55
Running simultaneous test scripts ........................................................................................... 6-56
Using the data queue for real-time communication ................................................................. 6-57
Copying test scripts across the TSP-Link network .................................................................. 6-57
Removing stale values from the reading buffer cache ............................................................ 6-58
TSP-Net ............................................................................................................................. 6-58
Overview ................................................................................................................................. 6-58
TSP-Net capabilities ................................................................................................................ 6-59
Using TSP-Net with any ethernet instrument .......................................................................... 6-59
TSP-Net compared to TSP-Link to communicate with TSP-enabled devices ......................... 6-61
TSP-Net instrument commands: General device control ........................................................ 6-61
TSP-Net instrument commands: TSP-enabled device control ................................................ 6-61
Example: Using tspnet commands .......................................................................................... 6-62
TSP command reference ............................................................................................ 7-1
TSP command programming notes ..................................................................................... 7-1
Placeholder text ........................................................................................................................ 7-2
Syntax rules .............................................................................................................................. 7-3
Time and date values ................................................................................................................ 7-3
Using the TSP command reference ..................................................................................... 7-4
Command name and summary table ........................................................................................ 7-4
Command usage ....................................................................................................................... 7-5
Command details ...................................................................................................................... 7-6