LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tektronix and labview interface through LAN

I want to interface Tektronix MSO64 (6 series) oscilloscope to Labview on my PC through an ethernet cable. I'm using a crossed cable, yet the VISA read option is not working. I get the following error 'error occurred at VISA read in filename.vi' when I run the code. Also, the oscilloscope shows 'LAN fault detected' at the LAN status. I tried searching the forums and even directly checked the read operation from MAX interactive panel, but could not find a solution. Could it be the LAN cable fault?

 

The screenshot is attached for reference. Please help me out as I am quite new to Labview.

 

Error when running the codeError when running the codeLAN fault detectedLAN fault detected

 

0 Kudos
Message 1 of 18
(3,715 Views)

A few comments:

  • I stopped using crossover cables about 15 years ago.  They are hard to obtain, hard to distinguish, and frequently not needed (especially as interfaces have gotten "smarter".  When we had the odd LabVIEW RT configuration "next to" the PC, I purchased a $30 4-port "switch" which configured the crossover (when needed) for me.
  • Have you tried to "ping" your oscilloscope from your PC?  I assume you know how to do this, but just in case:
    1. Bring up a Command Prompt (type "cmd" in the Search Window).
    2. Type "ping 192.168.1.1" (substitute the IP of the oscilloscope you are trying to reach).
    3. You should see 4 lines typed out that show if it succeeded in getting a response (or not!) from that IP address.  I'm guessing you will see 4 "Timed Out" messages.  If that happens, replace the cable first.

Bob Schor

Message 2 of 18
(3,689 Views)

@Bob_Schor wrote:

A few comments:

  • I stopped using crossover cables about 15 years ago.  They are hard to obtain, hard to distinguish, and frequently not needed (especially as interfaces have gotten "smarter".  When we had the odd LabVIEW RT configuration "next to" the PC, I purchased a $30 4-port "switch" which configured the crossover (when needed) for me.
  • Have you tried to "ping" your oscilloscope from your PC?  I assume you know how to do this, but just in case:
    1. Bring up a Command Prompt (type "cmd" in the Search Window).
    2. Type "ping 192.168.1.1" (substitute the IP of the oscilloscope you are trying to reach).
    3. You should see 4 lines typed out that show if it succeeded in getting a response (or not!) from that IP address.  I'm guessing you will see 4 "Timed Out" messages.  If that happens, replace the cable first.

Bob Schor


I think the real problem here is that the scope is set up for DHCP and your scope can't locate the DHCP server (of course) because it's hooked directly up to the PC, and that is the scope is complaining about.  But you should be able to reach it doing this: Try to reach the scope at the address it assigned itself (I forget what it's called, but most ethernet-capable things will default to an address of 169.254.x.x so if you don't have a network you can still talk to it.)

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 3 of 18
(3,676 Views)

Your computer and the oscilloscope need on the same subnet...

 

Set your scope to IP address 192.168.1.10

Set your computer Ethernet port to 192.168.1.11

Subnet mask for both 255.255.255.0

 

DO NOT USE a crossover cable and modernt Ethernet ports are "auto MDX" and do not require a crossover cable to connect two devices without a hub or switch.

========================
=== Engineer Ambiguously ===
========================
Message 4 of 18
(3,674 Views)

Thank you for the comments. Yes, I can successfully ping the scope with my PC and the LAN status is OK as well (using a straight-through ethernet cable now), but I'm still getting the read error. What could be the problem?

0 Kudos
Message 5 of 18
(3,632 Views)

Some questions:

  • Are you running an Ethernet cable directly from the Oscilloscope to the PC (I presume a second port on the PC), or are both connected to some other network?
  • Are you using 192.168.x.x as the IP?  This is a non-routable IP, often used for WiFi and WiFi routers.  Can you describe the network?
  • The Manual says "Tap Test Network".  Am I correct that you did this and "the LAN Status Indicator turned green"?
  • I found a section in the Manual that talked about Windows 7, and mentioned finding information about Windows 10 on the Web.  Have you checked this out?

At this point, it seems to be that there is a possibility (?) that the culprit is Tektronix.  To quote the piece of the manual:  "This procedure describes how to remotely access the UI controls and screen for standard (non Windows 10) instruments. To remotely access the UI controls and screen for Windows 10 instruments, see the Remote access to a Windows 10 instrument topic in the Help."

 

Bob Schor

0 Kudos
Message 6 of 18
(3,616 Views)

This scope probably has a web page.  Type the address into your browser to see if you can get to the web page.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 7 of 18
(3,593 Views)

Thank you @Bob_Schor for the questions and suggestions. I am trying to figure things out. 


  • Are you running an Ethernet cable directly from the Oscilloscope to the PC (I presume a second port on the PC), or are both connected to some other network?

Yes, I am directly connecting an ethernet cable from the scope to an adapter on my PC (ethernet to USB C adapter, as I don't have an ethernet port)


  • Are you using 192.168.x.x as the IP?  This is a non-routable IP, often used for WiFi and WiFi routers.  Can you describe the network?

Yes, the IP address is 192.168.1.10 (Not sure how to describe the network). I tried the method suggested by .@RTSLVU.


  • The Manual says "Tap Test Network".  Am I correct that you did this and "the LAN Status Indicator turned green"?

Yes, the 'test connection' status is OK as well. 

Screenshot (639).png

I tried to communicate with the scope using VISA interactive control option in MAX, and it yields a 'read operation error' 

Screenshot (638).png

 

😞

0 Kudos
Message 8 of 18
(3,583 Views)

Ah, yes, Serial Communication using VISA.  I don't do this often, but I've done it enough that I should be able to figure it out (with the help of the Tektronix Manual, of course).

 

Things to check:

  •  Somewhere there are settings for Baud Rate, Parity, Data Bits, and Stop Bits.  See what Tektronix says to use.  I'd think something like 57600, N, 8, 1 (Baud, no parity, 8 data, 1 stop bit).
  • Check if Tektronix uses Flow Control.  Do whatever they do (and if they don't mention it, leave it off, for now).
  • Check for (I don't remember what it's called), something like "Termination Character", which has an On/Off and a Character choice (this is when the Scope sends data to you).  You want this Enabled, and want LF (0x10 in Hex) as the termination character.  This tells Tektronix to terminate their messages to you with <LF>.
  • These settings are, I believe, the default settings for VISA in LabVIEW (the Configure VISA function), but I don't remember if MAX makes the same assumptions, be sure to check.

If this all works, then you'll be set up to do VISA reads the "right" way.  You send a VISA string to the Scope that says "Send me data", then do a VISA Read and get the Scope to ... Send you Data, of course!  Hmm, I didn't think about how the data comes to you.  The discussion, above, about Termination chartacters assumed that the data from the Instrument consisted of relatively short strings (a few hundred characters, at most).  For this, you simply tell the Scope to "send me data", then you Read 1000 Bytes, and when the Scope sends you a string of 73 bytes, followed by a Termination Character (LF), which you process (since you know the format of the String you are expecting, you can pull out the bits that you needs by doing String Operations.  Of course, if it is sending you sweeps, that might be a whole lot more data (which is why you Read the Manual, RTFM).

 

Bob Schor

0 Kudos
Message 9 of 18
(3,570 Views)

@Bob_Schor wrote:

Ah, yes, Serial Communication using VISA.  I don't do this often, but I've done it enough that I should be able to figure it out (with the help of the Tektronix Manual, of course).


Nobody in this thread mentioned Serial Communications.  The OP is trying to communicate through TCP/IP.

 

The problem I usually run into with TCP communications is addressing is wrong, including the following:

  • The instrument has the wrong address.
  • The controller/computer in not in the same subnet.  I use 192.168.0.XXX for my addresses to make sure everybody is on the same subnet.

GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 18
(3,554 Views)