Fundamentals of programming for TSP ........................................................................... 10-15
Introduction ........................................................................................................................... 10-15
What is Lua? ......................................................................................................................... 10-15
Lua basics ............................................................................................................................. 10-15
Standard libraries .................................................................................................................. 10-29
Programming example: Script with a for loop ........................................................................ 10-33
Using Test Script Builder (TSB) ....................................................................................... 10-33
Installing the TSB software.................................................................................................... 10-35
Installing the TSB add-in ....................................................................................................... 10-35
Using Test Script Builder (TSB) ............................................................................................ 10-35
Project navigator ................................................................................................................... 10-37
Script editor ........................................................................................................................... 10-37
Outline view ........................................................................................................................... 10-37
Programming interaction ....................................................................................................... 10-37
Connecting an instrument in TSB .......................................................................................... 10-38
Creating a new TSP project .................................................................................................. 10-39
Adding a new TSP file to a project ........................................................................................ 10-39
Running a script .................................................................................................................... 10-40
Creating a run configuration .................................................................................................. 10-40
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-45
Restore a script to the run-time environment ........................................................................ 10-48
Rename a script .................................................................................................................... 10-48
Delete user scripts from the instrument ................................................................................. 10-49
Memory considerations for the run-time environment ........................................................... 10-50
TSP-Link system expansion interface .............................................................................. 10-52
Master and subordinates ....................................................................................................... 10-52
TSP-Link system ................................................................................................................... 10-53
TSP-Link nodes ..................................................................................................................... 10-53
Connections ..................................................................................................................... 10-54
Initialization ...................................................................................................................... 10-54
Assigning node numbers ....................................................................................................... 10-54
Resetting the TSP-Link network ...................................................................................... 10-55
Front-panel operation ............................................................................................................ 10-55
Remote programming ........................................................................................................... 10-55
Using the expanded system ............................................................................................. 10-56
Accessing nodes ................................................................................................................... 10-56
Using the reset() command ................................................................................................... 10-57
Using the abort command ..................................................................................................... 10-57
Triggering with TSP-Link ....................................................................................................... 10-57
TSP advanced features.................................................................................................... 10-58
Using groups to manage nodes on TSP-Link network .................................................... 10-58
Master node overview ........................................................................................................... 10-59
Group leader overview .......................................................................................................... 10-59
Assigning groups ................................................................................................................... 10-59
Running simultaneous test scripts ................................................................................... 10-59
Coordinating overlapped operations in remote groups .......................................................... 10-60
Using the data queue for real-time communication ......................................................... 10-61
Copying test scripts across the TSP-Link network .......................................................... 10-61
Removing stale values from the reading buffer cache ..................................................... 10-61