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

Use VB to control Ethernet instruments

Martin Rowe, Senior Technical Editor -- Test & Measurement World, 12/1/2004

Instrument manufacturers regularly include Ethernet ports in their equipment. Because every PC also includes an Ethernet port, you can use the PC's I/O bus to control your test equipment. If an instrument doesn't come with software that works over Ethernet or if you want to write a custom application, you often need drivers and I/O libraries. But if you just want to write a simple application with Visual Basic (VB) or Visual C++, you don't need drivers or libraries; instead, you can use code developed by Werner Haussmann of Agilent Technologies (werner_haussmann@agilent.com).

Haussmann's software, available for download from the T&MW Web site, uses VB's Winsock control to provide access to a PC's Ethernet port. In a paper that accompanies the software, Haussmann shows you how to verify communications between the PC and the instrument before you use the VB code. The paper walks you through programming examples, showing you how to use the Winsock control.

As part of the download, you get a more extensive programming example, including a VB project that lets you communicate with an Agilent N6700A power supply. The sample VB project uses a button to initiate an IEEE 488.2 *IDN? command for identifying the instrument. A reply field lets you view the instrument's response. Although the VB project is written for the N6700A, you can modify the source code to fit any instrument.

You can download Haussmann's software at
www.reed-electronics.com/tmworld/contents/pdf/TMW_VB-60_LAN_Sockets.zip 
(The project consists of several files in a .zip file.)

You can download the paper at www.tmworld.com/contents/txt/TMW_1204_vb_web.doc.

Email
Print
Reprint
Learn RSS

Talkback

We would love your feedback!

Post a comment

» VIEW ALL TALKBACK THREADS

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