Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Talking to an instrument over LAN using a Mac and LabVIEW for the first time. Need advice...

Solved!
Go to solution

Hi,

I am trying to communicate with an instrument over LAN for the first time and I must make some silly rookie mistake in what I am doing. So any help is needed.

 

My goal: Use the LabVIEW community edition on a Mac and send a *IDN? command to a Siglent DMM over LAN (Figs. 1-2). The Siglent DMM is connected to a local router with an ethernet cable and the Mac computer is connected to the routers network via Wifi.

 

Version info of what I have:

LabVIEW: Community 21

MacOS: 10.15.7 (Catalina)

NI VISA: 21.0

NI 488.2: 21.0.0 

 

On the DMM I get the IP address it has been assigned by the router (Figs. 3-4).

 

I then ping this address from my computer and it works just fine (Fig. 6). I get a respons within a millisecond or so. The computer is only connected to this network (Fig. 5).

 

I then add a VISA resource using the VISA resource editor using this IP and using the VSI-11 protocol and give it an alias of SiglentDMM (Fig. 7). It takes it just fine and I can see that it shows up in NI MAX just fine (Figs. 8-9)

 

I then select this resource on the control element on the front panel in LabVIEW for the VISA open call and it is there too (Fig. 1).

 

However, when I run the code I get an error as shown in Fig. 1…

 

If I use USB/VISA for communication instead with the same instrument (disconnect all cables and restart just to be sure) every thing works fine. I see the USB resource, I select it and run the program and I get the response back from the *IDN? command. What could be wrong here with my LAN approach?

 

Below are some images that show some key aspects. Thank you in advance!

Front Panel.jpegFig. 1. Front panel showing the error when I talk over LAN.

 

Diagram.jpeg

Fig. 2. The diagram of my test program that sends the *IDN? command

 

Siglent DHCP.jpeg

Fig. 3. Siglent DHCP menu

 

Siglent LAN.jpeg

Fig. 4. Siglent LAN menu

 

Wifi.jpeg

Fig. 5. Computer network settings.

 

Ping.jpeg

Fig. 6. Ping results

 

Resource Settings.jpeg

Fig. 7. VISA resource settings.

 

Reserouce Settings 2.jpeg

Fig. 8. VISA configuration.

 

NI MAX.jpeg

Fig. 9. NI MAX monitor

0 Kudos
Message 1 of 6
(2,534 Views)

Update: I connected two Keysight instruments to the router (34461 DMM and EDU36311A power supply) and guess what... they work fine over LAN! They show up as a resource without me having to add them manually. I then tried my Siglent function generator and as with the Siglent DMM, it did not work. This means that my issue is related to the LAN feature on Siglent instruments. I might have to call their tech support now that I have narrowed down the issue.

0 Kudos
Message 2 of 6
(2,514 Views)

You should probably turn off the "Using DHCP" option on your devices.  I strictly use static IP addresses in my test setups.



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 3 of 6
(2,501 Views)

Hi,

Good point. Thanks! I tried turning it off but it did not change anything. Ping still works though (I set it to a different IP just to make it clear it took it). Could it be that the Siglent VISA implementation is different? I am using the latest versions of everything. My Keysight instruments, as mentioned, shows up in the VISA resource manager automatically and works right away. They seem to support the latest VISA standards and work flawlessly. I am sure it is possible to get the Siglents to work too but it seems tricky and I have yet to find any detailed information about it. If anyone has used Siglent over LAN with LabVIEW and figured this out it would be great to know what the trick is. Right now the "trick" seems to be to spend more and get Keysight... 🙂

 

0 Kudos
Message 4 of 6
(2,482 Views)
Solution
Accepted by topic author Mikael_Garcia

Please try the following two.

 

-Enter inst0 in the LAN Device Name and try to connect to TCPIP0::10.0.1.3::inst0::INSTR.

 

-Try communication in Socket mode instead of VXI-11

(It wasn't mentioned in the PDF manual, but the port number is probably 5024.)

If Socket communication is possible and VXI-11 communication is not possible, it is possible that the LAN Device Name is special. (Although it is not described in the manual.)

Message 5 of 6
(2,473 Views)

lwa6,

WOW! Thank you so much!!!

 

I now got it to work on my Siglent thanks to your suggestions. This is what I had to do:

 

  1. Use the VXI-11 protocol
  2. Use the LAN device name 'inst0'. No other name will work!!!
  3. Set VISA read/write to synchronous mode.

 

Again, thank you so much for this. Much appreciated!

 

0 Kudos
Message 6 of 6
(2,433 Views)