End Namespace
VISA.NET Example in IronPython
You can also control Keysight oscilloscopes using the VISA.NET library and Python
programming language on the .NET platform using:
• IronPython (http://ironpython.net/) which is an implementation of the Python
To run this example with IronPython:
1
2
3
#
# Keysight VISA.NET Example in IronPython
# *********************************************************
# This program illustrates a few commonly used programming
# features of your Keysight InfiniiVision oscilloscope.
# *********************************************************
# Import Python modules.
# ---------------------------------------------------------
import sys
sys.path.append("C:\Python27\Lib")
import string
# Import .NET modules.
# ---------------------------------------------------------
from System import *
from System.IO import *
from System.Text import *
from System.Runtime.InteropServices import *
import clr
clr.AddReference("Ivi.Visa")
from Ivi.Visa import *
from Ivi.Visa.FormattedIO import *
# =========================================================
# Initialize:
# =========================================================
def initialize():
# Get and display the device's *IDN? string.
Keysight InfiniiVision DSOX1204A/G Oscilloscopes Programmer's Guide
Console.ReadKey()
End Sub
End Class
programming language running under .NET.
Cut-and-paste the code that follows into a file named "example.py".
Edit the program to use the address of your oscilloscope.
If the IronPython "ipy.exe" can be found via your PATH environment variable,
open a Command Prompt window; then, change to the folder that contains the
"example.py" file, and enter:
ipy example.py
Programming Examples
# Python Standard Library.
36
907
Need help?
Do you have a question about the InfiniiVision DSOX1204A and is the answer not in the manual?