Scpi.net Example In Ironpython - Agilent Technologies Infiniium 90000 Series Programmer's Manual

Oscilloscopes
Hide thumbs Also See for Infiniium 90000 Series:
Table of Contents

Advertisement

38
Sample Programs
End Namespace

SCPI.NET Example in IronPython

You can also control Agilent oscilloscopes using the SCPI.NET library and
Python programming language on the .NET platform using:
• IronPython ("http://ironpython.codeplex.com/") which is an
To run this example with IronPython:
1
2
3
4
#
# Agilent SCPI.NET Example in IronPython
# *********************************************************
# This program illustrates a few commonly used programming
# features of your Agilent oscilloscope.
# *********************************************************
# Import Python modules.
# ---------------------------------------------------------
import sys
sys.path.append("C:\Python26\Lib")
sys.path.append("C:\ProgramData\Agilent\Command Expert\ScpiNetDrivers")
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("AgInfiniium90000_3_10")
from Agilent.CommandExpert.ScpiNet.AgInfiniium90000_3_10 import *
# =========================================================
# Initialize:
# =========================================================
def initialize():
1144
End Class
implementation of the Python programming language running under
.NET.
Install the Agilent Command Expert software and the command set for
the oscilloscope.
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
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
# Python Standard Library.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents