Global TMW:
Login  |  Register          Free Newsletter Subscription
Subscribe
Email
Print
Reprint
Learn RSS

Linux controls instruments through Ethernet

Martin Rowe, Senior Technical Editor -- Test & Measurement World, 4/1/2006

To learn more about using VXI-11 and direct socket communication, download "Using Linux to control LAN-based instruments," by Stefan Kopp of Agilent Technologies. The ZIP file includes source-code examples for VISA and socket communication. You can also find more information in "Migrating to Ethernet" from the October 2004 issue of Test & Measurement World.

Because every PC built in the last several years has an Ethernet port, the bus has become popular for controlling instruments—you can connect test equipment directly to the PC without the need for an interface card. In addition, many manufacturers provide instrument drivers for the Windows operating system, making it easy for engineers to set up and run an Ethernet-based test system.

But if you prefer the Linux operating system, setting up a test system is slightly more difficult. Instrument drivers are not as commonplace for Linux, so you need to find another way to communicate with instruments through the Ethernet port. You have two communication software options: the Virtual Instrument Software Architecture (VISA) driver or a direct communication through a transmission control protocol (TCP) socket.

You can use VISA and VXI-11 or direct socket communication to control instruments over Ethernet.
Developed by the VXIplug&play Alliance, VISA has an extension called VXI-11 that lets application programs communicate with instruments over Ethernet. The advantage of VISA and VXI-11 is that you can use the same code that you use for IEEE 488 communication. You just have to change one line of code to tell VISA to communicate over Ethernet. LAN Extensions for Instrumentation (LXI) enhances VISA, but you can use VISA with any instrument that has an Ethernet port. The figure shows the protocol stack for VISA and VXI-11. Your test application and VISA reside at the application layer and must communicate through all seven layers to reach your instrument.

Your second option is to bypass the session and presentation layers by communicating directly to the TCP layer using direct socket communication. Socket communication requires less code than using VISA, but the code isn't compatible with VISA or IEEE 488.

Email
Print
Reprint
Learn RSS

Related Content

Related Content

 

By This Author

Sponsored Links



 
Advertisement
SPONSORED LINKS

More Content

  • Blogs
  • Podcasts

Blogs

  • Rick Nelson
    TAKING THE MEASURE

    July 1, 2008
    S-parameters are so yesterday
    Textbook amplifiers operate in linear mode and are easy to analyze. Unfortunately, it’s often ...
    More
  • Martin Rowe
    Rowe's and Columns

    May 28, 2008
    More on Bill and Dave
    In my January 11 posting, "Tell your Bill and Dave Stories," I asked if the HP Way still e...
    More
  • » VIEW ALL BLOGS RSS

Podcasts

Advertisements





NEWSLETTERS
Click on a title below to learn more.

Test Industry News (3 Times Per Month)
Machine-Vision & Inspection (Monthly)
Communications Test (Monthly)
Design, Test & Yield (Monthly)
Automotive, Aerospace & Defense (Monthly)
Instrumentation (Monthly)
Resource Center E-Alert (Monthly)
©2008 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy
Please visit these other Reed Business sites