Table of Contents
Data queue................................................................................................................................ 5-5
Digital I/O .................................................................................................................................. 5-5
Display ...................................................................................................................................... 5-6
Error queue ............................................................................................................................... 5-6
Event log ................................................................................................................................... 5-6
File I/O ...................................................................................................................................... 5-7
GPIB ......................................................................................................................................... 5-8
Instrument identification ............................................................................................................ 5-8
LAN and LXI .............................................................................................................................. 5-9
Miscellaneous ......................................................................................................................... 5-10
Parallel script execution .......................................................................................................... 5-10
Reading buffer ......................................................................................................................... 5-11
Reset ....................................................................................................................................... 5-11
RS-232 .................................................................................................................................... 5-11
Saved setups .......................................................................................................................... 5-11
Scripting .................................................................................................................................. 5-12
SMU ........................................................................................................................................ 5-13
SMU calibration ....................................................................................................................... 5-14
Status model ........................................................................................................................... 5-15
Time ........................................................................................................................................ 5-16
Triggering ................................................................................................................................ 5-17
TSP-Link ................................................................................................................................. 5-19
TSP-Net .................................................................................................................................. 5-19
Userstrings .............................................................................................................................. 5-20
Factory scripts .................................................................................................................... 5-20
Introduction ............................................................................................................................. 5-20
Running a factory script .......................................................................................................... 5-21
KISweep factory script ............................................................................................................ 5-22
KIPulse factory script .............................................................................................................. 5-23
KIHighC factory script ............................................................................................................. 5-24
KIParlib factory script .............................................................................................................. 5-24
KISavebuffer factory script ...................................................................................................... 5-24
Instrument programming ........................................................................................... 6-1
What is a script? ........................................................................................................................ 6-2
Manage scripts .......................................................................................................................... 6-3
Programming example ............................................................................................................ 6-12
Introduction ............................................................................................................................. 6-14
What is Lua? ........................................................................................................................... 6-14
Lua basics ............................................................................................................................... 6-14
Standard libraries .................................................................................................................... 6-30
Programming example ............................................................................................................ 6-36
Project Navigator ..................................................................................................................... 6-37
Script Editor ............................................................................................................................. 6-37
Programming interaction ......................................................................................................... 6-37
iv
Model 2651A High Power System SourceMeter® Instrument Reference Manual
2651A-901-01 Rev. A / March 2011