/PythonVisa

Passthrough VISA calls to pyvisa.

Primary LanguagePythonMIT LicenseMIT

PythonVisa

Use PyVISA and PyVISA-py to supply VISA instrument communication to Keysight OpenTAP when a vendor implementation is not available.

Dependencies / Pre-requisites

Build

# 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

Test with pyvisa-sim instrument simulation

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

Connect to a real instrument

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