About Expeyes remote server
This App creates and binds a listening socket on port 8080.
External clients on the same network can connect to
and read/write to it.
Ensure that the device running this app, and your client device are on the same network.
-One way is to connect both to a WiFi router.
-Another is to create a WiFi hotspot on this device, and connect your client to it.
All standard expEYES commands are supported, and a 'read' command
is used to fetch various data.
Also responds to '*IDN?' query
Here's an example python script to get you started
#-------Example.py-------------
import socket
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect(('',8080))
s.send('get_voltage(1)n')
s.send('read(value)n') #Arguments can be t1,ch1,t2,..ch4,timestamp,value
print s.recv(100)
#--------------------------------------
#-----------example2.py---------
import socket
from pylab import *
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect(('',8080))
f = s.makefile()
ion()
figure, ax = subplots()
lines, = ax.plot([],[])
for m in range(10):
s.send('capture(1,1800,5)nread(t1,ch1)n') #capture points
#s.send('read(t1,ch1)n')
x=f.readline()
y=f.readline()
a=[float(i) for i in x.split(',')] #float array from ASCII string
b=[float(i) for i in y.split(',')]
lines.set_xdata(a)
lines.set_ydata(b)
ax.relim()
ax.autoscale_view()
draw()
#-----------------------------------------------------