It is great to use inexpensive, but still powerful older lab equipment. The TDS754A in my lab is better than any oscilloscope (o-scope) I have used at work and I purchased it for less than

*** QuickLaTeX cannot compile formula:
600.   One of the drawbacks of older equipment is the connectivity options.   This model on the front panel, for example, has the venerable floppy drive to ease the use of screen capture and data transfer.    But who has or wants to use a floppy drive today?  If you have seen any of my blog entries with o-scope shots, you will definitely notice they were taken with the ubiquitous cell phone camera.    And since they all have lots of shadows and poor lighting I was looking for a way to improve.
<!-- /wp:paragraph -->

<!-- wp:image {"id":3633,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://surfncircuits.com/wp-content/uploads/2020/11/img_0813-1024x768.jpg" alt="" class="wp-image-3633"/><figcaption>The good old days of using a floppy.  I don't miss these things. </figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
Fortunately, like other high end lab equipment in the same era, this scope has the sturdy and robust GPIB bus connection.     Now that I'm working at home due to Covid-19, I had an excuse to get my poor o-scope shots updated.   In this blog, I will show how I recently purchased and used the <a rel="noreferrer noopener" href="http://prologix.biz/" target="_blank">Prologix GPIB-ETHERNET (GPIB-LAN) Controller</a> to perform  color or black and white screen captures of the TDS754A scope.   I could not find a simple script on the internet to capture images for this controller, so I took a Sunday and wrote a python script myself.  This same procedure should work for all the color and black and white Tektronix scopes made during the same time period (i.e. TDS 500 series, TDS 600 series, and TDS 700 series).   The script is on <a rel="noreferrer noopener" href="https://github.com/drkmsmithjr/TdsScopeCapture" target="_blank">Github</a> and I will would love to hear about any pull requests you have to add more features and expand the scripts usability.    Please enjoy and let me know your comments below.        
<!-- /wp:paragraph -->

<!-- wp:video {"guid":"qc4R3Gkm","id":3641} -->
<figure class="wp-block-embed is-type-video is-provider-videopress"><div class="wp-block-embed__wrapper">
https://videopress.com/v/qc4R3Gkm?preloadContent=metadata
</div><figcaption>Tektronix TDS754A scope capture over ethernet </figcaption></figure>
<!-- /wp:video -->

<!-- wp:heading {"level":3} -->
<h3>Setting up the TDS O-Scope and Prologix Controller </h3>
<!-- /wp:heading -->

<!-- wp:image {"id":3665,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://surfncircuits.com/wp-content/uploads/2020/11/img_0822-1024x768.jpg" alt="" class="wp-image-3665"/><figcaption>Attaching the GPIP-Ethernet Controller to the Back of the TDS754A</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
After plugging in the Prologix controller into the o-scope, ensure that the GPIB port on the o-scope is powered up.   To do this, go to the from utility menu, select the GPIB Port and set the Talk/Listen Address to 1 as follows:
<!-- /wp:paragraph -->

<!-- wp:image {"id":3671,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://surfncircuits.com/wp-content/uploads/2020/11/capture23.jpg" alt="" class="wp-image-3671"/><figcaption>From the o-scopes Utility Menu, Turn on the GPIB port and set the Talk/Listen Address to 1</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
Run the Prologic GPIB Configurator and be sure to setup the controller to read GPIB address 1, the same address as set on the o-scope.   Also copy the settings to match the following image
<!-- /wp:paragraph -->

<!-- wp:image {"id":3676,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://surfncircuits.com/wp-content/uploads/2020/11/GPIB-LAN-Setup.png" alt="" class="wp-image-3676"/></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":3} -->
<h3>Python Library Requirements</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
The following libraries are needed to run the script.  Ensure you have pip3 installed to add these libraries to your system.    
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>
pip3 install pyvisa
pip3 install pyvisa-py
pip3 install tqdm</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<a href="https://pyvisa.readthedocs.io/en/latest/" target="_blank" rel="noreferrer noopener">Pyvisa</a> is a nice open-source framework for controlling instruments in python. <a href="https://github.com/tqdm/tqdm" target="_blank" rel="noreferrer noopener">TQDM</a> is a great library for showing the progress bar in a command-line program.   Additionally, on my distribution, these modules were installed in my local user name /bin directory and were not automatically on my

*** Error message:
Missing $ inserted.

PATH name. I had to add this /bin directory to my
*** QuickLaTeX cannot compile formula:
PATH</a> variable in order to allow the python script to locate them automatically.    
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Find the IP Address</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
Prologic.biz has a linux based command line utility python script, nfcli.py, that can automatically search and find the controller on your network.  It is a python 2.7 based script and can be executed as follows:
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>python nfcli.py</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
On my distribution, python 2.7 was not automatically installed, so I installed it simply by running the following command
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>sudo apt-get install python</code></pre>
<!-- /wp:code -->

<!-- wp:heading {"level":3} -->
<h3>Capturing Images</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
You are now ready to start capturing images.   To capture a <strong>bmp </strong>color image, simply run the command as follows:  
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>python3 TdsCapture.py</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
To capture a <strong>tiff</strong> image, run the script as follows:
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>python3 TdsCapture.py TIFF</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
The images will be saved in the diretory with the following format and with a sequencial number scheme
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>captureX.Y</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
where X is the sequential images number starting with 1 and Y is either <strong>bmp</strong> or t<strong>iff </strong>depending if it is color or black and white.
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Do you have similar scripts?  </h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
I hope you enjoyed this quick and dirty python script to facilitate great scope shots for your next projects.    Let me know if you have any suggested improvements or git pull requests.  Do you have a similar script?    I would love to hear or know about the tools you use in your lab.    Take care.  It looks like the surf may be good next week.       
<!-- /wp:paragraph -->

<!-- wp:heading {"level":4} -->
<h4>References:</h4>
<!-- /wp:heading -->

<!-- wp:list -->
<ul><li><a rel="noreferrer noopener" href="https://pyvisa.readthedocs.io/en/latest/" target="_blank">Pyvisa</a>:  Open-source framework for controlling instruments in python</li><li><a rel="noreferrer noopener" href="https://github.com/tqdm/tqdm" target="_blank">TQDM</a>:  Showing the progress bar in a command-line program</li><li><a rel="noreferrer noopener" href="https://linuxize.com/post/how-to-add-directory-to-path-in-linux/" target="_blank">linuxize.com:</a>  Instruction for changing your

*** Error message:
Missing $ inserted.

PATH Variable
  • Prologix.biz: The home page of the GPIB-Ethernet Controller