TCPIP0::10.0.0.250::5025::SOCKET
import vxi11
instr = vxi11.Instrument("TCPIP0::10.0.0.250::5025::SOCKET")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.linux-x86_64/egg/vxi11/vxi11.py", line 357, in __init__
vxi11.vxi11.Vxi11Exception: Invalid resource string [init]
Just realised I can use plain old sockets and skip vxi11 altogether.
--
You received this message because you are subscribed to the Google Groups "python-ivi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-ivi+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
If your instrument supports VXI-11, why do you need to open a socket?
VXI-11 is a higher-level protocol which uses sockets internally. So if you aren't using python-ivi, then just open a socket directly from python. If you want to use python-ivi, then I need to put together a wrapper that will open a socket instead of using python-vxi11. This is on my to-do list.
Here is a quick example for how to open a TCP socket in python:
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("192.168.0.26", 5025))
sock.send("*idn?")
print(sock.recv(512))
Alex Forencich
Quoting:
http://lxistandard.org "HiSLIP for Fast Remote Control of LXI Instruments":
"Sockets and HiSLIP provide a 2-5 times faster interface to LXI instruments than VXI-11."