AnsweredAssumed Answered

Remote programming of E5061B

Question asked by eduardo.coelho on Apr 10, 2014
Latest reply on May 1, 2014 by mr_matt
Hi!

I'm new at the field of remote programming measurement instruments. After reading some texts around, I installed Agilent VISA libraries and drivers, and by now I'm trying to communicate with a E5061B network analyzer.

But all of my programs are showing the error message below.

C:\Users\eduardo.coelho\Desktop>test.py
Agilent Technologies,E5061B,MY49101655,A.02.00
Exception pyvisa.errors.VisaIOError: VisaIOError(u'VI_ERROR_INV_OBJECT (-1073807346): The given session or object reference is invalid.',) in  ignored

Program used (test.py):

import visa
rm = visa.ResourceManager()
network_analyzer = rm.get_instrument("TCPIP0::A-E5061B-01655.local.::inst0::INSTR")
print(network_analyzer.ask("*IDN?"))

Although every SCPI command seems to work correctly, this message appers. I'm using Python through the PyVisa module on Windows.

Regarding VISA x sockets programming, I guess sockets may be the best choice for me, once I'll always connect to the instrument through LAN. But I heard some issues about socket programming regarding timing and synchronization. So I really would like to now if there is some advantage by VISA over sockets in my case.

Thanks in advance,

Eduardo  

Outcomes