question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[COM] Communication issue with MSO44 using USB

See original GitHub issue

Instrument details

  • Model: MSO44
  • Communication: USB
  • Link to the documentation (if available): https://download.tek.com/manual/4-5-6Series-MSO-Programmer-Interface-Manual_EN-US_077130508.pdf

Output of pyvisa-info

Microsoft Windows [Version 10.0.19042.1288]
(c) Microsoft Corporation. All rights reserved.

Machine Details:
   Platform ID:    Windows-10-10.0.19041-SP0
   Processor:      Intel64 Family 6 Model 142 Stepping 12, GenuineIntel

Python:
   Implementation: CPython
   Executable:     C:\Users\rerus\AppData\Local\Programs\Python\Python39\python.exe
   Version:        3.9.4
   Compiler:       MSC v.1928 64 bit (AMD64)
   Bits:           64bit
   Build:          Apr  6 2021 13:40:21 (#tags/v3.9.4:1f2e308)
   Unicode:        UCS4

PyVISA Version: 1.10.0.dev0

Backends:
   ni:
      Version: 1.10.0.dev0 (bundled with PyVISA)
      #1: C:\WINDOWS\system32\visa32.dll:
         found by: auto
         bitness: 64
         Vendor: National Instruments
         Impl. Version: 22020096
         Spec. Version: 5244928
      #2: C:\WINDOWS\system32\visa64.dll:
         found by: auto
         bitness: 64
         Vendor: National Instruments
         Impl. Version: 22020096
         Spec. Version: 5244928

Description of issue: I am doing continuous and autonomous frequency measurement on some test devices. Every couple of hours or so (anywhere form 1 hour to 50 hours) my oscilloscope will freeze and data communication will cease to work. Other users online report that this may be because scopes do not respond well to communication errors. I did some capture tracing with NI I/O trace to give some insight on what is happening. It looks like the scope just fails to respond to a *OPC? query after some irregular amount of time… I also included the measurement function in my python code where the issue seems to occur. My python script attempts to close the resource and reconnect to it, but this does not work because the scope is not responsive after this supposed communication error. Any queries or reads like *IDN? will timeout (which is set to 7 minutes for my program). Any help or suggestions would be greatly appreciated!

Measurement Code:

# single shot acq is configured before this function call using 
#    scope.write('acquire:state off\n')
#    scope.write('acquire:stopafter sequence\n')
def measureFreq(scope, ro, channel, numberOfTimes):
    freqList = [] 
    success = 0
    tried = 0

    # set the waveview display, horizonal/vertical scaling based on ro and channel params

    scope.write('measurement:immed:type frequency\n')
    while success < numberOfTimes and tried < 50:
        time.sleep(0.01)
        scope.write("trigger force\n")
        scope.write('acquire:state on\n')
        # wait for acquisition to complete
        scope.query('*opc?',delay=0.1)

        # make the measurement
        freqValue = float(scope.query('measurement:immed:value?',delay=0.1))
        if freqValue < 9.9E+37: 
            freqList.append(freqValue)
            success += 1
        tried += 1
    scope.write('acquire:state off\n')
    return freqList

NI Trace ERROR part 1 NI Trace ERROR part 2 NI Trace ERROR part 3

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
yonixiongcommented, Nov 5, 2021

I have updated the firmware to the most recent version (v1.36.2) like you mentioned. I will see it that fixes the issue, but the problem does seem to be exactly described in the release notes. Thank you for your help!

0reactions
yonixiongcommented, Nov 8, 2021

It looks like I need to take this issue to the manufacturer. I added a cyclic close to my program, and an OPC timeout happened 15 minutes after a successful refresh of the connection. Hopefully, they can help me… At least it does not seem to be an issue stemming from PyVISA. Thanks for the valuable discussion here!

Trace for after firmware update: NI Trace ERROR PostFirmUpdate

Trace for after adding cyclic close: NI Trace ERROR postCyclicClose

Read more comments on GitHub >

github_iconTop Results From Across the Web

4/5/6 Series MSO, LPD64 (MSO44, MSO46, MSO54, MSO56 ...
Connect the oscilloscope to a PC using a USB cable ... 4 Series MSO MSO44, MSO46 Service Manual (Tektronix part number 077-1547-xx; available....
Read more >
Tektronix MSO44 4-BW-1000 - Rent or Lease - TRS-Rentelco
Rent, Lease or Buy Tektronix MSO44 4-BW-1000 Realtime Oscilloscopes 1GHz - 8GHz from TRS-RenTelco and enjoy better financing options and same-day shipping.
Read more >
How to Control a Tektronix Oscilloscope Over a LAN - YouTube
Learn how to use the eScope function to remotely control a Tektronix oscilloscope over a network without any special software.
Read more >
Tektronix MSO44 4-BW-500 - Test Equipment Depot
Tektronix MSO44 4-BW-500 500 MHz, 4-FlexChannel, 6.25 GS/s Mixed Signal Oscilloscope, ... SENT, USB 2.0, Ethernet, I2S, LJ, RJ, TDM, MIL-STD-1553, ARINC 429....
Read more >
Using MATLAB Software with Tektronix Instruments - MathWorks
Communication Protocols. If an instrument driver is not available for your instrument, you can communicate directly with the instrument using SCPI commands over...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found