Agilent Technologies

Raw Socket: *IDN? for LAN Instruments Read Me

This sample program does an identification (*IDN?) query to a LAN-connected instrument via the Windows Sockets (Winsock) I/O API.

Date: December 1, 2004

Version: 1.00

Programming Language: C in Microsoft® Visual Studio® (Using the Winsock 2 communication API)

Required Instrument: Any LAN-enabled instrument with raw TCP socket capabilities and a *IDN? response (33220A, for example.)

Operating Systems Required: Windows® 98, Windows Me, Windows NT® 4.0, Windows 2000, Windows XP

Usage Instructions:

Unzip the Visual Studio project into a "clean" directory and open the project. Change the IP address in the RawSocketComm.c file to the IP address of a LAN instrument that can respond to a *IDN? query and supports raw TCP/IP socket communication. The VISA resource name for such instruments is of the form "TCPIP::hostname::portnumber::SOCKET". Compile and execute the program.

Other Information:

Any I/O API that supports raw TCP (Transmission Control Protocol) socket communication can be used for a program equivalent to this one. Agilent recommends the VISA I/O Library in either the C-language or COM (Component Object Model) API format for instrument communication. However, when VISA is not available or usable for some reason, raw TCP socket communication via a native operating system-provided I/O API such as Winsock is often possible with Agilent's LAN-connected instruments. See the Agilent IO Libraries Suite documentation for more information on LAN communication and VISA.

AGILENT PROVIDES THIS FREE SOFTWARE "AS IS". ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO ANY WARRANTY OF NON-INFRINGEMENT, THE IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY, REASONABLE CARE AND SKILL, AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Agilent shall not be liable in any way whatsoever for any damages of any nature arising from its use. In no event shall Agilent be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to: procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability or tort (including negligence or otherwise) except if caused by willful misconduct or gross negligence arising in any way out of the use of this software, even if advised of the possibility of such damage and if it has been ensured that such data can be reconstructed with reasonable expenditure from data material provided in machine-readable form.

Windows is a U.S. registered trademark of Microsoft Corporation.

Microsoft is a U.S. registered trademark of Microsoft Corporation.

Windows NT is a U.S. registered trademark of Microsoft Corporation.

Visual Studio is a registered trademark of Microsoft Corporation in the United States and/or other countries.

 

Copyright © 2004 Agilent Technologies, Inc.


© Agilent 2000-2006