01-19-2023 12:42 AM
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 code
LAN fault detected
01-19-2023 08:45 AM
A few comments:
Bob Schor
01-19-2023 10:03 AM
@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:
- Bring up a Command Prompt (type "cmd" in the Search Window).
- Type "ping 192.168.1.1" (substitute the IP of the oscilloscope you are trying to reach).
- 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.)
01-19-2023 10:10 AM
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.
01-20-2023 04:30 AM
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?
01-20-2023 12:00 PM
Some questions:
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
01-21-2023 12:30 AM
This scope probably has a web page. Type the address into your browser to see if you can get to the web page.
01-21-2023 04:27 AM
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.
I tried to communicate with the scope using VISA interactive control option in MAX, and it yields a 'read operation error'
😞
01-21-2023 09:49 PM
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:
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
01-22-2023 07:08 AM
@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: