import visa
scope = visa.instrument("TCPIP0::130.30.240.155::inst0::INSTR")
scope.ask("*idn?")
'Agilent Technologies,MSOX93204A,MY53240105,04.60.0016'
(Assumes Python for .NET dll's & spci.net dll copied into Python dirs)
import clr
clr.AddReference("AgInfiniium90000_04_00_0004")
from Agilent.CommandExpert.ScpiNet.AgInfiniium90000_04_00_0004 import *
scope = AgInfiniium90000("TCPIP0::localhost::inst0::INSTR")
idn = ""
idn = scope.SCPI.IDN.Query(idn)
--------------------------------------------------------------------------- CommunicationException Traceback (most recent call last) <ipython-input-1-285435e77dea> in <module>() 2 clr.AddReference("AgInfiniium90000_04_00_0004") 3 from Agilent.CommandExpert.ScpiNet.AgInfiniium90000_04_00_0004 import * ----> 4 scope = AgInfiniium90000("TCPIP0::localhost::inst0::INSTR") 5 idn = "" 6 idn = scope.SCPI.IDN.Query(idn) CommunicationException: A VISA COM error occurred (HRESULT = 80040000) at Agilent.CommandExpert.Scpi.Connections.VisaScpiConnection.a(COMException A_0) at Agilent.CommandExpert.Scpi.Connections.VisaScpiConnection.OpenConnectionInternal() at Agilent.CommandExpert.Scpi.Connections.BaseScpiConnection.OpenConnection(ScpiExecution parent) at Agilent.CommandExpert.Scpi.ScpiExecution.Connect() at Agilent.CommandExpert.ScpiNet.AgInfiniium90000_04_00_0004.AgInfiniium90000.Initialize(ISource rh) at Agilent.CommandExpert.ScpiNet.AgInfiniium90000_04_00_0004.AgInfiniium90000..ctor(String location, Int32 timeout) at Agilent.CommandExpert.ScpiNet.AgInfiniium90000_04_00_0004.AgInfiniium90000..ctor(String location)
scope.SCPI.IDN.
u'Agilent Technologies,N8900A,No Serial,04.99.201402240'
import sys
#sys.path.append("C:\Users\marnj\Documents\Visual Studio 2012\Projects\myDll\myDll\bin\Debug")
import clr
#clr.FindAssembly("myDll")
clr.AddReference(u"C:\\Users\\marnj\\Documents\\Visual Studio 2012\\Projects\\myDll\\myDll\\bin\\Debug\\myDll")
from myDll import mycalc
myinst = mycalc()
myinst.Add(
myinst.__doc__
'Void .ctor()'