This is an open source project from Keithley Instruments. We welcome
any feedback on the GitHub repo for this project.
Keithley TSP™ Toolkit is a Visual Studio Code extension that provides rich
support for Keithley's Test Script Processor (TSP) technology to edit and execute
scripts on TSP-enabled Keithley instruments. The extension includes command-set documentation and language features such as
syntax error detection and code navigation (provided by sumneko.lua) as well as
code-completion suggestions, inline help, and TSP command documentation.
Demo Video
Installed Extensions
Keithley TSP Toolkit will automatically install the sumneko.lua
extension to use all of the language features it provides.
Extensions installed through the marketplace are subject to the Marketplace Terms of Use.
Quick Start
Step 1. Connect your TSP-enabled Keithley instrument to your local network (LAN).
Step 2. Install the Keithley TSP Toolkit Visual Studio Code Extension.
Step 3. Open or create a folder for your TSP project.
Step 4. Configure your project for your TSP-Link™ instrument configuration.
Step 5. Edit and run your TSP scripts by right-clicking them in the file explorer,
file tabs, or editor window and selecting "Send Script to Terminal"
Usage Notes
When running scripts or commands via the terminal, errors are only fetched after the
requested action completes. No new errors will be printed while the operation is in
progress.
Useful Commands
Open the Command Pallette (Cmd+Shift+P on macOS and
Ctrl+Shift+P on Windows or Linux), then type one of the
following commands:
Command |
Description |
Shortcut |
TSP: Connect |
Opens a new terminal session to an instrument (be sure to close with .exit , see the Known Issues section below) |
|
TSP: Send Script to Terminal |
Sends the script in the current editor window to the currently connected instrument |
|
To see all available Keithley TSP Toolkit commands, open the Command Pallette and type TSP
.
To see all available context-sensitive options, right-click on your active editor window while a *.tsp
file is open:
Context-Sensitive Option |
Description |
Send Script to All Terminals |
Send the current script to all the currently connected instruments with active terminals open |
Send Script to Terminal |
Send the current script to the currently connected instrument |
There are two ways to configure your project to have language features for your TSP-Link
node network: Automatic or Manual.
After completing either method, you will be shown relevant code completion suggestions,
signature help, and documentation for the instruments in your TSP-Link network.
Automatic Configuration
If you are already connected to a physical instrument with your TSP-Link network configured,
then it is possible to have TSP Toolkit automatically configure your project for you.
- Open any workspace folder in VSCode
- If your workspace folder does not already contain one, create a .tsp (for example
my-tsp-file.tsp
)
- Connect to your instrument using the discovery pane or the
TSP: Connect
command.
- Right-click on the
.vscode/tspConfig
folder
- Select "Fetch TSP-Link Nodes for Connected Instrument"
Manual Configuration
- Open any workspace folder in VSCode
- If your workspace folder does not already contain one, create a .tsp (for example
my-tsp-file.tsp
)
- Open
tspConfig/config.tsp.json
- Enter your instrument model name for the
"self"
attribute in the JSON.
Resources and Tutorials
Feature Details
The Keithley TSP Toolkit includes:
- Language Features: Write your code with the assistance of autocompletion and
syntax checking
- Hover Help: Access detailed information on individual commands such as definition,
accepted parameters, and usage examples
- Command Interface: Send commands and interact directly with your instruments
through the terminal
- Instrument Autodiscovery: Discover available instruments on your local network
- Instrument Firmware Upgrade: Remotely upgrade the instrument firmware
Supported Locales
The extension is currently only available in English.
Questions, Issues, Feature Requests, and Contributions
- If you come across a problem with the extension, please file an issue
- Any and all feedback is appreciated and welcome!
- If someone has already filed an issue that encompasses your
feedback, please leave a 👍/👎 reaction on the issue. Otherwise please start a new
discussion
- If on Windows, you must have Microsoft Visual C++ Redistributable. Please ensure you have this installed.
Known Issues
We are constantly working to improve the stability and reliability of this software. Here
are the known issues that we are working to fix. If you come across new issues,
please let us know! See the next section
for more information.
- Due to limitations in instrument firmware, script names longer than 27 characters will
be truncated to 27 characters. If multiple scripts have names that are the same up to
the 27th character, the second script will overwrite the first.
- The list of instruments that support language features is limited to the following:
- 2450
- 2460
- 2461
- 2470
- 2601B
- 2601B-PULSE
- 2602B
- 2604B
- 2611B
- 2612B
- 2614B
- 2634B
- 2635B
- 2636B
- 2651A
- 2657A
- DMM7510
- Upgrading firmware on the 3706A, 707B, and 708B instruments is not successful. This will NOT
render the instrument inoperable, but will not complete successfully.