Hello,
I'm going crazy in order to communicate with the DMM pyvisa-py on TCPIP:
2015-08-20 00:09:39,056 - pyvisa - DEBUG - Created library wrapper for unset
2015-08-20 00:09:39,056 - pyvisa - DEBUG - Created ResourceManager with session 2052846
2015-08-20 00:09:39,056 - pyvisa - DEBUG - TCPIP0::192.168.1.144::INSTR - opening ...
2015-08-20 00:09:39,091 - pyvisa - DEBUG - TCPIP0::192.168.1.144::INSTR - is open with session 7697116
2015-08-20 00:09:39,106 - pyvisa - DEBUG - TCPIP0::192.168.1.144::INSTR - reading 20480 bytes (last status <StatusCode.success_max_count_read: 1073676294>)
2015-08-20 00:09:48,769 - pyvisa - DEBUG - TCPIP0::192.168.1.144::INSTR - closing
Exception NotImplementedError: NotImplementedError() in <bound method TCPIPInstrument.del of <'TCPIPInstrument'(u'TCPIP0::192.168.1.144::inst0::INSTR')>> ignored
the python script is this:
import visa
visa.log_to_screen()
rm = visa.ResourceManager("@py")
inst = rm.open_resource("TCPIP0::192.168.1.144::INSTR")
print(inst.query("*IDN?"))
I'm used Linux 64bit and WindowsXp with python 2.7 32bit, but the error is the same.
I sniffed the network traffic and does not receive the correct response, the protocol VXI11 reports a timeout error.
With original software and NI-VISA library work fine, not with PyVisa and the same NI-VISA.
This is the debug with last pyvisa-py and python3
2015-08-20 00:23:17,237 - pyvisa - DEBUG - SerialSession was correctly imported.
2015-08-20 00:23:17,254 - pyvisa - DEBUG - USBSession and USBRawSession were correctly imported.
2015-08-20 00:23:17,264 - pyvisa - DEBUG - TCPIPSession was not imported cannot import name 'TCPIPSession'.
2015-08-20 00:23:17,266 - pyvisa - DEBUG - GPIBSession was not imported No module named 'gpib'.
2015-08-20 00:23:17,267 - pyvisa - DEBUG - Created library wrapper for unset
2015-08-20 00:23:17,267 - pyvisa - DEBUG - Created ResourceManager with session 6265688
2015-08-20 00:23:17,267 - pyvisa - DEBUG - TCPIP0::192.168.1.144::INSTR - opening ...
2015-08-20 00:23:17,267 - pyvisa - DEBUG - RawTCPClient: connecting to socket at (192.168.1.144, 111)
2015-08-20 00:23:17,273 - pyvisa - DEBUG - Make call <PortMapperVersion.get_port: 3>, (395183, 1, 6, 0), '<bound method PortMapperPacker.pack_mapping of <pyvisa-py.protocols.rpc.PortMapperPacker object at 0x7fd5132b1ba8>>', '<bound method PortMapperUnpacker.unpack_uint of <pyvisa-py.protocols.rpc.PortMapperUnpacker object at 0x7fd5162ad048>>'
2015-08-20 00:23:17,273 - pyvisa - DEBUG - Sending record through <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, proto=0, laddr=('192.168.1.103', 59810), raddr=('192.168.1.144', 111)>: b'\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x02\x00\x01\x86\xa0\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x07\xaf\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\x00'
2015-08-20 00:23:17,283 - pyvisa - DEBUG - Received record through <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, proto=0, laddr=('192.168.1.103', 59810), raddr=('192.168.1.144', 111)>: b'\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02f'
2015-08-20 00:23:17,283 - pyvisa - DEBUG - RawTCPClient: closing socket
2015-08-20 00:23:17,283 - pyvisa - DEBUG - RawTCPClient: connecting to socket at (192.168.1.144, 614)
2015-08-20 00:23:17,290 - pyvisa - DEBUG - Make call 10, (411798420, 0, 10000, 'inst0'), '<bound method Vxi11Packer.pack_create_link_parms of <pyvisa-py.protocols.vxi11.Vxi11Packer object at 0x7fd5132cdf98>>', '<bound method Vxi11Unpacker.unpack_create_link_resp of <pyvisa-py.protocols.vxi11.Vxi11Unpacker object at 0x7fd5132cdd68>>'
2015-08-20 00:23:17,290 - pyvisa - DEBUG - Sending record through <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, proto=0, laddr=('192.168.1.103', 48346), raddr=('192.168.1.144', 614)>: b"\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x07\xaf\x00\x00\x00\x01\x00\x00\x00\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x8b\x8b\x94\x00\x00\x00\x00\x00\x00'\x10\x00\x00\x00\x05inst0\x00\x00\x00"
2015-08-20 00:23:17,302 - pyvisa - DEBUG - Received record through <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, proto=0, laddr=('192.168.1.103', 48346), raddr=('192.168.1.144', 614)>: b'\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02f\x00\x00\x04\x00'
2015-08-20 00:23:17,303 - pyvisa - DEBUG - TCPIP0::192.168.1.144::INSTR - is open with session 6559734
2015-08-20 00:23:17,303 - pyvisa - DEBUG - Make call 11, (0, 10000, 10000, 136, b'_IDN?\r\n'), '<bound method Vxi11Packer.pack_device_write_parms of <pyvisa-py.protocols.vxi11.Vxi11Packer object at 0x7fd5132cdf98>>', '<bound method Vxi11Unpacker.unpack_device_write_resp of <pyvisa-py.protocols.vxi11.Vxi11Unpacker object at 0x7fd5132cdd68>>'
2015-08-20 00:23:17,303 - pyvisa - DEBUG - Sending record through <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, proto=0, laddr=('192.168.1.103', 48346), raddr=('192.168.1.144', 614)>: b"\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x07\xaf\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\x10\x00\x00'\x10\x00\x00\x00\x88\x00\x00\x00\x07_IDN?\r\n\x00"
2015-08-20 00:23:17,309 - pyvisa - DEBUG - Received record through <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, proto=0, laddr=('192.168.1.103', 48346), raddr=('192.168.1.144', 614)>: b'\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x00\x00\x00\x00'
2015-08-20 00:23:17,309 - pyvisa - DEBUG - TCPIP0::192.168.1.144::INSTR - reading 20480 bytes (last status <StatusCode.success_max_count_read: 1073676294>)
2015-08-20 00:23:17,310 - pyvisa - DEBUG - Make call 12, (0, 1024, 10000, 10000, 0, 0), '<bound method Vxi11Packer.pack_device_read_parms of <pyvisa-py.protocols.vxi11.Vxi11Packer object at 0x7fd5132cdf98>>', '<bound method Vxi11Unpacker.unpack_device_read_resp of <pyvisa-py.protocols.vxi11.Vxi11Unpacker object at 0x7fd5132cdd68>>'
2015-08-20 00:23:17,310 - pyvisa - DEBUG - Sending record through <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, proto=0, laddr=('192.168.1.103', 48346), raddr=('192.168.1.144', 614)>: b"\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x07\xaf\x00\x00\x00\x01\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00'\x10\x00\x00'\x10\x00\x00\x00\x00\x00\x00\x00\x00"
2015-08-20 00:23:26,962 - pyvisa - DEBUG - Received record through <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, proto=0, laddr=('192.168.1.103', 48346), raddr=('192.168.1.144', 614)>: b'\x00\x00\x00\x03\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x00\x00\x00\x00\x00\x00\x00'
2015-08-20 00:23:26,975 - pyvisa - DEBUG - TCPIP0::192.168.1.144::INSTR - closing
2015-08-20 00:23:26,975 - pyvisa - DEBUG - Make call 23, 0, '<bound method Vxi11Packer.pack_device_link of <pyvisa-py.protocols.vxi11.Vxi11Packer object at 0x7fd5132cdf98>>', '<bound method Vxi11Unpacker.unpack_device_error of <pyvisa-py.protocols.vxi11.Vxi11Unpacker object at 0x7fd5132cdd68>>'
2015-08-20 00:23:26,975 - pyvisa - DEBUG - Sending record through <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, proto=0, laddr=('192.168.1.103', 48346), raddr=('192.168.1.144', 614)>: b'\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x07\xaf\x00\x00\x00\x01\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2015-08-20 00:23:26,983 - pyvisa - DEBUG - Received record through <socket.socket fd=12, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, proto=0, laddr=('192.168.1.103', 48346), raddr=('192.168.1.144', 614)>: b'\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2015-08-20 00:23:26,983 - pyvisa - DEBUG - RawTCPClient: closing socket
2015-08-20 00:23:26,983 - pyvisa - DEBUG - TCPIP0::192.168.1.144::INSTR - is closed
2015-08-20 00:23:26,987 - pyvisa - DEBUG - Closing ResourceManager (session: 6265688)
Best regards