LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview instrument communication using Ethernet

I have a Agilent Spectrum Analyzer E4440A that im trying to communicate with in Labview using a router as a subnet with Ethernet connection.. Do anyone know of how to start with the connection and programming so I can read in my measurements into my labview program?
0 Kudos
Message 1 of 9
(4,320 Views)
Open MAX and right click on Devices and Interfaces and select Create New...VISA TCP/IP Resource. You will have a couple of options depending on the type of resource you have. Check the instrument manual.
0 Kudos
Message 2 of 9
(4,318 Views)

Thanks for your response. Im getting an error when i type in the instrument IP address the error is " could not open a VISA session to "TCPIP0::***.***.***;***::INSTR".   VISA error code 0Xbfff0011   insufficient location information or the device or resources is not present in the system.  

For Device name do I just make up one?

0 Kudos
Message 3 of 9
(4,313 Views)
You are typing the address where? If you went through the procedure in MAX and the instrument was found, you don't type in anything. You select it from the VISA Resource Name just like serial or GPIB resources.
0 Kudos
Message 4 of 9
(4,310 Views)

When I open up MAX then i click on Devices and Interfaces  then right click create new

then VISA TCP/IP Resources

then NEXT  I select Manual Entry of LAN insturment then next. I choose this option because  auto detect of LAN instrument does not detect any instrument.

It ask for a Hostname or IP address and

LAN Device Name

0 Kudos
Message 5 of 9
(4,299 Views)

Were do i find my VISA Alias on my system?

0 Kudos
Message 6 of 9
(4,292 Views)

I know what it asks for. What do you specify? You should know the IP address. That is something you assign unless you are using DHCP. Even then, you should be able to get the IP or hostname that is assigned. It would be one ot the menus on the instrument. I don't remember about LAN Device Name. the last time I had to communicate to a LAN instrument, I used the raw socket since it was not a VXI-11 instrument.

 

One thing I should add. First try doing a ping of the instrument.

0 Kudos
Message 7 of 9
(4,291 Views)

How to start?

 

Easy - first you have to establish that the network is working.  There is no fun and little profit in chasing possible programming errors if the router is powered off.

 

1... Verify that the device indeed speaks TCP/IP.  Talking over Ethernet, and talking TCP/IP are two different things.  The manual should tell you this.

2... If it doesn't speak TCP/IP, skip the rest of this message. 

3... Assuming it speaks TCP, find its IP number.  This is probably configurable from the device itself. Consult its manual. 

4... from the Mac or Windows COMMAND line, type "Ping 127.0.0.1"  (or whatever that IP number is.  You should get back good replies.  If you DON'T, then stop here and  troubleshoot your network gear. 

 

5... If you want to do the low-level stuff in LabVIEW, check out the TCP category on my blog.  If you want to work at a higher level, try the VISA stuff in MAX.

 

But don't attack the programming before you've established basic communication. 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 8 of 9
(4,277 Views)

Thanks Steve I will try that.

0 Kudos
Message 9 of 9
(4,271 Views)