Traditionally, if the Tek3000 scope has an Ethernet interface, then the commands are just like good old GPIB, which Tek has documented (https://www.tek.com/oscilloscope/tds3014b-manual/tds3000-tds3000b-tds3000c-series).
There's no need for your scope network to connect to anything internetty.
The benefit for using the Ethernet interface, is that it is simple, and there is no need for involving additional layers, like VISA.
The USB interface requires more tools, like VISA. Visa works great, once you get it all setup, and provides reliable communication, but it is more to learn, and likely unnecessary for a project like this.
A sample Python transaction for a Tek3000 over Ethernet:
(I can't indicate the original writer of this code - it's been too long. Parts of it are likely me, parts from co-workers, parts from internet. If you recognize this as your work, then please indicate so in the comments.)
Intro comments:
"""
tds3014b.py - Script to provide control and data acquisition from the
Tektronix TDS3014B oscilloscope via Ethernet.
Example Usage:
>>> import tds3014b
>>> t = tds3014b.tds3014b(ip_addr='192.168.0.106')
Send a GPIB command to the scope - the return value is the response from the scope.
>>> t.gpib_cmd('*IDN?')
'TEKTRONIX,TDS 3014B,0,CF:91.1CT FV:v3.27 TDS3GV:v1.00 TDS3FFT:v1.00 TDS3TRG:v1.00\n'
>>> t.beep() # Make a sound
Fetch the current scope screen as an image:
>>> screen = t.get_screen() # PNG image data in a variable
>>> screen = t.get_screen('tds_screen.png') # PNG data in var and written to disk
Fetch the current data for a waveform on the specified channel using
get_waveform. get_waveform returns a header, containing metadata
about the waveform, and the data as a list of points.
>>> header, data = t.get_waveform(channel=1, format='eng') # returns header (dict) and converted data points (array)
>>> header, data = t.get_waveform(channel=1, format='counts') # same as above but data points are in ADC counts instead of volts
>>> header, data = t.get_waveform(channel=1, format='csv') # data format is csv string
>>> header, data = t.get_waveform(channel=1, plot=True) # Will display plot on screen
The data can also be plotted afterwards using plot():
>>> t.plot(header, data)
Requirements:
For plotting, Numpy and Matplotlib are required. If you do not intend to plot,
only Python is required.
"""
import httplib2 # for Http
import urllib # for urlencode
import os
import struct
import datetime
Sample GPIB support:
def gpib_cmd(self, cmd):
"""
Send a command to the scope and gets the response, if any.
Commands are anything from the programming menu that you would
typically send over GPIB, such as 'BUSY?' or 'FPANEL:PRESS
clearmenu'. The commands are sent by encoding them into a URL
like this: http://192.168.0.106/?COMMAND=:BUSY?
"""
# Commands that start with '*' (like *IDN?) shouldn't get a
# ':' prefix. Not exactly sure what the spec is, but this
# works.
if(cmd.startswith('*')):
prefix = ''
else:
prefix = ':'
cmd_url = "?COMMAND=%s%s" % (prefix, urllib.quote_plus(cmd))
url = '/'.join([self.base_url, cmd_url])
f = urllib.urlopen(url)
content = f.read()
f.close()
return content
Sample Command:
def force_trig(self):
""" If the scope is in a state where the force trig button
would trigger it, this would do the same thing.
"""
self.gpib_cmd('FPANEL:PRESS FORCETRIG')
Good luck!