Use PyVISA and PyVISA-py to supply VISA instrument communication to Keysight OpenTAP when a vendor implementation is not available.
- .NET 6
- Python 3.7+
- OpenTAP 9.20.0+ (needed for dynamic VISA loading)
- OpenTAP Python plugin 3.0.0+
- PyVISA, PyVISA-py, PyVISA-sim (optional)
# build a release version of the plugin
dotnet build -c Release
# package the plugin into a .TapPackage
./bin/tap package create -v --project-directory ./ ./package.xml
# install the package into the local copy of OpenTAP
cd ./bin
./tap package install -v ../*.TapPackage
# install the Python pre-requisites for the plugin
./tap python install-requirements -v
To test basic functionality, you can use the included idn.TapPlan
from ./test-files
and pyvisa-sim to test sending a SCPI commmand from OpenTAP to a virtual instrument.
Further tests could be developed by creating more test plans and adding virtual commands to ./test-files/simulation_instrument.yaml
cp -R ./test_files/* ./bin/
cd ./bin
# run from the commandline
./tap run --non-interactive -v idn.TapPlan
# run from the TUI
./tap tui
When the PythonVisa plugin is installed in OpenTAP, and no standard VISA vendor implementation is available, the plugin will automatically provide VISA connections for supported instrument communication types:
- Serial
- USB-TMC
- LAN VXI-11 (::INSTR)
- LAN SOCKET (::SOCKET)
For more information about PyVISA-py's capabilities, see their website at https://pyvisa.readthedocs.io/projects/pyvisa-py